postgresql/contrib/postgres_fdw
Etsuro Fujita 6c07f9ebce postgres_fdw: Fix subabort cleanup of connections used in asynchronous execution.
Commit 27e1f1456 resets the per-connection states of connections used to
scan foreign tables asynchronously during abort cleanup at main
transaction end, but it failed to do so during subabort cleanup at
subtransaction end, leading to a segmentation fault when re-executing an
asynchronous-foreign-table-scan query in a transaction that was
cancelled in a subtransaction of it.

Fix by modifying pgfdw_abort_cleanup() to reset the per-connection state
of a given connection also when called for subabort cleanup.  Also,
modify that function to do the reset in both the abort-cleanup and
subabort-cleanup cases if necessary, to save cycles, and improve a
comment on it a little bit.

Back-patch to v14 where the aforesaid commit came in.

Reviewed by Alexander Pyhalov

Discussion: https://postgr.es/m/CAPmGK14cCV-JA7kNsyt2EUTKvZ4xkr2LNRthi1U1C3cqfGppAw@mail.gmail.com
2022-01-21 17:45:00 +09:00
..
expected postgres_fdw: Add regression test for postgres_fdw.application_name GUC. 2022-01-07 15:31:56 +09:00
sql postgres_fdw: Add regression test for postgres_fdw.application_name GUC. 2022-01-07 15:31:56 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
connection.c postgres_fdw: Fix subabort cleanup of connections used in asynchronous execution. 2022-01-21 17:45:00 +09:00
deparse.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
option.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Add Boolean node 2022-01-17 10:38:23 +01:00
postgres_fdw.control postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
postgres_fdw.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
shippable.c Update copyright for 2022 2022-01-07 19:04:57 -05:00