pgsql: Disable timeouts when running pg_rewind with online sourceclust - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Disable timeouts when running pg_rewind with online sourceclust
Date
Msg-id E1i2o2T-00009S-Ca@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Disable timeouts when running pg_rewind with online source cluster

In this case, the transfer uses a libpq connection, which is subject to
the timeout parameters set at system level, and this can make the rewind
operation suddenly canceled which is not good for automation.  One
workaround to such issues would be to use PGOPTIONS to enforce the
wanted timeout parameters, but that's annoying, and for example pg_dump,
which can run potentially long-running queries disables all types of
timeouts.

lock_timeout and statement_timeout are the ones which can cause problems
now.  Note that pg_rewind does not use transactions, so disabling
idle_in_transaction_session_timeout is optional, but it feels safer to
do so for the future.

This is back-patched down to 9.5.  idle_in_transaction_session_timeout
is only present since 9.6.

Author: Alexander Kukushkin
Discussion: https://postgr.es/m/CAFh8B=krcVXksxiwVQh1SoY+ziJ-JC=6FcuoBL3yce_40Es5_g@mail.gmail.com
Backpatch-through: 9.5

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/bin/pg_rewind/libpq_fetch.c | 37 ++++++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Fix 007_sync_rep.pl to notice failures in ALTER SYSTEMSET.
Next
From: Michael Paquier
Date:
Subject: pgsql: Improve coverage of utils/float.h