pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Use elog, not Assert, to report failure to provide an outer snap 5+ messages / 1 participants [nested] [flat]
* pgsql: Use elog, not Assert, to report failure to provide an outer snap @ 2021-07-31 15:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-07-31 15:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use elog, not Assert, to report failure to provide an outer snapshot. As of commit 84f5c2908, executing SQL commands (via SPI or otherwise) requires having either an active Portal, or a caller-established active snapshot. We were simply Assert'ing that that's the case. But we've now had a couple different reports of people testing extensions that didn't meet this requirement, and were confused by the resulting crash. Let's convert the Assert to a test-and-elog, in hopes of making the issue clearer for extension authors. Per gripes from Liu Huailing and RekGRpth. Back-patch to v11, like the prior commit. Discussion: https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/17035-14607d308ac8643c@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ef12f32c0870b73ab7589ffc178094ac9ba3e84f Modified Files -------------- src/backend/tcop/pquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Use elog, not Assert, to report failure to provide an outer snap @ 2021-07-31 15:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-07-31 15:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use elog, not Assert, to report failure to provide an outer snapshot. As of commit 84f5c2908, executing SQL commands (via SPI or otherwise) requires having either an active Portal, or a caller-established active snapshot. We were simply Assert'ing that that's the case. But we've now had a couple different reports of people testing extensions that didn't meet this requirement, and were confused by the resulting crash. Let's convert the Assert to a test-and-elog, in hopes of making the issue clearer for extension authors. Per gripes from Liu Huailing and RekGRpth. Back-patch to v11, like the prior commit. Discussion: https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/17035-14607d308ac8643c@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ec410c985e6d360f666e39be5609f3c4da5edc8f Modified Files -------------- src/backend/tcop/pquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Use elog, not Assert, to report failure to provide an outer snap @ 2021-07-31 15:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-07-31 15:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use elog, not Assert, to report failure to provide an outer snapshot. As of commit 84f5c2908, executing SQL commands (via SPI or otherwise) requires having either an active Portal, or a caller-established active snapshot. We were simply Assert'ing that that's the case. But we've now had a couple different reports of people testing extensions that didn't meet this requirement, and were confused by the resulting crash. Let's convert the Assert to a test-and-elog, in hopes of making the issue clearer for extension authors. Per gripes from Liu Huailing and RekGRpth. Back-patch to v11, like the prior commit. Discussion: https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/17035-14607d308ac8643c@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/93f99693f9c2a8e0662d847c4ba2abed1628c1d8 Modified Files -------------- src/backend/tcop/pquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Use elog, not Assert, to report failure to provide an outer snap @ 2021-07-31 15:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-07-31 15:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use elog, not Assert, to report failure to provide an outer snapshot. As of commit 84f5c2908, executing SQL commands (via SPI or otherwise) requires having either an active Portal, or a caller-established active snapshot. We were simply Assert'ing that that's the case. But we've now had a couple different reports of people testing extensions that didn't meet this requirement, and were confused by the resulting crash. Let's convert the Assert to a test-and-elog, in hopes of making the issue clearer for extension authors. Per gripes from Liu Huailing and RekGRpth. Back-patch to v11, like the prior commit. Discussion: https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/17035-14607d308ac8643c@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f260436459a67e320937d656b2c93604615ed1e5 Modified Files -------------- src/backend/tcop/pquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Use elog, not Assert, to report failure to provide an outer snap @ 2021-07-31 15:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-07-31 15:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use elog, not Assert, to report failure to provide an outer snapshot. As of commit 84f5c2908, executing SQL commands (via SPI or otherwise) requires having either an active Portal, or a caller-established active snapshot. We were simply Assert'ing that that's the case. But we've now had a couple different reports of people testing extensions that didn't meet this requirement, and were confused by the resulting crash. Let's convert the Assert to a test-and-elog, in hopes of making the issue clearer for extension authors. Per gripes from Liu Huailing and RekGRpth. Back-patch to v11, like the prior commit. Discussion: https://postgr.es/m/OSZPR01MB6215671E3C5956A034A080DFBEEC9@OSZPR01MB6215.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/17035-14607d308ac8643c@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cefb1230e7aa564aed08c4997f2ffa463b30363e Modified Files -------------- src/backend/tcop/pquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2021-07-31 15:50 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-07-31 15:50 pgsql: Use elog, not Assert, to report failure to provide an outer snap Tom Lane <tgl@sss.pgh.pa.us> 2021-07-31 15:50 pgsql: Use elog, not Assert, to report failure to provide an outer snap Tom Lane <tgl@sss.pgh.pa.us> 2021-07-31 15:50 pgsql: Use elog, not Assert, to report failure to provide an outer snap Tom Lane <tgl@sss.pgh.pa.us> 2021-07-31 15:50 pgsql: Use elog, not Assert, to report failure to provide an outer snap Tom Lane <tgl@sss.pgh.pa.us> 2021-07-31 15:50 pgsql: Use elog, not Assert, to report failure to provide an outer snap 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