Обсуждение: pgsql: postgres_fdw: Add connection status check to postgres_fdw_get_co

Поиск
Список
Период
Сортировка

pgsql: postgres_fdw: Add connection status check to postgres_fdw_get_co

От
Fujii Masao
Дата:
postgres_fdw: Add connection status check to postgres_fdw_get_connections().

This commit extends the postgres_fdw_get_connections() function
to check if connections are closed. This is useful for detecting closed
postgres_fdw connections that could prevent successful transaction
commits. Users can roll back transactions immediately upon detecting
closed connections, avoiding unnecessary processing of failed
transactions.

This feature is available only on systems supporting the non-standard
POLLRDHUP extension to the poll system call, including Linux.

Author: Hayato Kuroda
Reviewed-by: Shinya Kato, Zhihong Yu, Kyotaro Horiguchi, Andres Freund
Reviewed-by: Onder Kalaci, Takamichi Osumi, Vignesh C, Tom Lane, Ted Yu
Reviewed-by: Katsuragi Yuta, Peter Smith, Shubham Khanna, Fujii Masao
Discussion: https://postgr.es/m/TYAPR01MB58662809E678253B90E82CE5F5889@TYAPR01MB5866.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/857df3cef7be93f7b9214c926e7af6f06a8cf23e

Modified Files
--------------
contrib/postgres_fdw/connection.c               | 84 +++++++++++++++++++++++--
contrib/postgres_fdw/expected/postgres_fdw.out  | 54 ++++++++++++++--
contrib/postgres_fdw/postgres_fdw--1.1--1.2.sql |  5 +-
contrib/postgres_fdw/sql/postgres_fdw.sql       | 33 ++++++++++
doc/src/sgml/postgres-fdw.sgml                  | 42 ++++++++++---
5 files changed, 199 insertions(+), 19 deletions(-)