pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disable timeouts when running pg_rewind with online source clust
Date: Wed, 28 Aug 2019 02:50:25 +0000
Message-ID: <E1i2o2T-00009Y-DJ@gemulon.postgresql.org> (raw)

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
------
REL9_6_STABLE

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

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



view thread (6+ messages)

Message-ID: <E1i2o2T-00009Y-DJ@gemulon.postgresql.org>
Permalink:  ../E1i2o2T-00009Y-DJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1i2o2T-00009Y-DJ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Disable timeouts when running pg_rewind with online source clust
  In-Reply-To: <E1i2o2T-00009Y-DJ@gemulon.postgresql.org>
  References: <E1i2o2T-00009Y-DJ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox