pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid Assert failure when processing empty statement in aborted 6+ messages / 1 participants [nested] [flat]
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/555b929bbe7bd2f228e804d2c5bf4a246a319358 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cb74f7bec64f3333efa4227f804f72a3c353cd08 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/120ea65b8a0c7fd5c8f45030ec6a7fd979eaafc3 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d1fc0f382da15d2901bb740d9dfdd6be6488a1e4 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a98a040056c1f9322c2a271cbfaa4d36a5df0265 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid Assert failure when processing empty statement in aborted @ 2023-06-21 15:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-06-21 15:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a8be2356c55617eb959d38c8c249b454e1280a18 Modified Files -------------- src/backend/utils/cache/plancache.c | 4 +++- src/test/regress/expected/psql.out | 11 +++++++++++ src/test/regress/sql/psql.sql | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-06-21 15:07 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us> 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us> 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us> 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us> 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us> 2023-06-21 15:07 pgsql: Avoid Assert failure when processing empty statement in aborted Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox