postgresql/src
Tom Lane 555b929bbe Avoid Assert failure when processing empty statement in aborted xact.
exec_parse_message() wants to create a cached plan in all cases,
including for empty input.  The empty-input path does not have
a test for being in an aborted transaction, making it possible
that plancache.c will fail due to trying to do database lookups
even though there's no real work to do.

One solution would be to throw an aborted-transaction error in
this path too, but it's not entirely clear whether the lack of
such an error was intentional or whether some clients might be
relying on non-error behavior.  Instead, let's hack plancache.c
so that it treats empty statements with the same logic it
already had for transaction control commands, ensuring that it
can soldier through even in an already-aborted transaction.

Per bug #17983 from Alexander Lakhin.  Back-patch to all
supported branches.

Discussion: https://postgr.es/m/17983-da4569fcb878672e@postgresql.org
2023-06-21 11:07:24 -04:00
..
backend Avoid Assert failure when processing empty statement in aborted xact. 2023-06-21 11:07:24 -04:00
bin Pre-beta2 mechanical code beautification. 2023-06-20 09:50:43 -04:00
common meson: Add dependencies to perl modules to various script invocations 2023-06-09 20:12:16 -07:00
fe_utils Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
include Move bool parameter for vacuum_rel() to option bits. 2023-06-20 15:14:58 -07:00
interfaces libpq: Add missing gettext trigger 2023-06-16 10:53:22 +02:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl meson: Add dependencies to perl modules to various script invocations 2023-06-09 20:12:16 -07:00
port Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Avoid Assert failure when processing empty statement in aborted xact. 2023-06-21 11:07:24 -04:00
timezone Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
tools Allow and require passing files on command line of pgperltidy 2023-06-21 16:20:26 +02:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Fix prove_installcheck when used with PGXS 2023-05-05 07:09:52 +02:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00