pgsql: dblink, postgres_fdw: Handle interrupts during connection establ

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: dblink, postgres_fdw: Handle interrupts during connection establ
Дата
Msg-id E1pK9xm-005Awl-H8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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:

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e4602483e95bebd4da31e4ea95dc5c7f715c1e4f

Modified Files
--------------
contrib/dblink/dblink.c           | 79 ++++++---------------------------------
contrib/postgres_fdw/connection.c | 42 +++------------------
2 files changed, 17 insertions(+), 104 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix error handling in libpqrcv_connect()
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Fix the Drop Database hang.