postgresql/contrib/postgres_fdw
Fujii Masao 32a9c0bdf4 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
2020-10-06 10:51:07 +09:00
..
expected postgres_fdw: reestablish new connection if cached one is detected as broken. 2020-10-06 10:51:07 +09:00
sql postgres_fdw: reestablish new connection if cached one is detected as broken. 2020-10-06 10:51:07 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
connection.c postgres_fdw: reestablish new connection if cached one is detected as broken. 2020-10-06 10:51:07 +09:00
deparse.c Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
option.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
shippable.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00