postgresql/contrib/postgres_fdw
Andres Freund e4602483e9 dblink, postgres_fdw: Handle interrupts during connection establishment
Until now dblink and postgres_fdw did not process interrupts during connection
establishment. Besides preventing query cancellations etc, this can lead to
undetected deadlocks, as global barriers are not processed.

These aforementioned undetected deadlocks are the reason for the spate of CI
test failures in the FreeBSD 'test_running' step.

Fix the bug by using the helper from libpq-be-fe-helpers.h, introduced in a
prior commit. Besides fixing the bug, this also removes duplicated code
around reserving file descriptors.

As the change is relatively large and there are no field reports of the
problem, don't backpatch for now.

Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20220925232237.p6uskba2dw6fnwj2@awork3.anarazel.de
Backpatch:
2023-01-23 19:25:23 -08:00
..
expected Get rid of the "new" and "old" entries in a view's rangetable. 2023-01-18 13:23:57 -05:00
sql Sample postgres_fdw tables remotely during ANALYZE 2022-12-30 23:16:01 +01: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 dblink, postgres_fdw: Handle interrupts during connection establishment 2023-01-23 19:25:23 -08:00
deparse.c Remove redundant grouping and DISTINCT columns. 2023-01-18 12:37:57 -05:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
option.c Update copyright for 2023 2023-01-02 15:00:37 -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 Remove redundant grouping and DISTINCT columns. 2023-01-18 12:37:57 -05: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 Check relkind before using TABLESAMPLE in postgres_fdw 2023-01-07 14:39:33 +01:00
shippable.c Update copyright for 2023 2023-01-02 15:00:37 -05:00