pgsql: postgres_fdw: reestablish new connection if cached one is detect

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pgsql: postgres_fdw: reestablish new connection if cached one is detect
Дата
Msg-id E1kPc9v-0005L4-2l@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: postgres_fdw: reestablish new connection if cached one is detect  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-committers
postgres_fdw: reestablish new connection if cached one is detected as broken.

In postgres_fdw, once remote connections are established, they are cached
and re-used for subsequent queries and transactions. There can be some
cases where those cached connections are unavaiable, for example,
by the restart of remote server. In these cases, previously an error was
reported and the query accessing to remote server failed if new remote
transaction failed to start because the cached connection was broken.

This commit improves postgres_fdw so that new connection is remade
if broken connection is detected when starting new remote transaction.
This is useful to avoid unnecessary failure of queries when connection is
broken but can be reestablished.

Author: Bharath Rupireddy, tweaked a bit by Fujii Masao
Reviewed-by: Ashutosh Bapat, Tatsuhito Kasahara, Fujii Masao
Discussion: https://postgr.es/m/CALj2ACUAi23vf1WiHNar_LksM9EDOWXcbHCo-fD4Mbr1d=78YQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32a9c0bdf493cf5fc029ab44a22384d547290eff

Modified Files
--------------
contrib/postgres_fdw/connection.c              | 54 ++++++++++++++++++++------
contrib/postgres_fdw/expected/postgres_fdw.out | 48 +++++++++++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql      | 41 +++++++++++++++++++
3 files changed, 131 insertions(+), 12 deletions(-)


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc: show functions returning record types and use of ROWS FROM
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Try to unbreak 021_row_visibility.pl on mingw.