aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-06-21 11:07:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-06-21 11:07:11 -0400
commita98a040056c1f9322c2a271cbfaa4d36a5df0265 (patch)
treea6a625bd378d0141f9640cf631ccfe783302678d /src/backend/executor
parent0e73b9ae6c5f661fbe5c14332351190588741e52 (diff)
downloadpostgresql-a98a040056c1f9322c2a271cbfaa4d36a5df0265.tar.gz
postgresql-a98a040056c1f9322c2a271cbfaa4d36a5df0265.zip
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
Diffstat (limited to 'src/backend/executor')
0 files changed, 0 insertions, 0 deletions