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: Refresh apply delay on reload of recovery_min_apply_delay at rec
Date: Mon, 16 Aug 2021 03:12:58 +0000
Message-ID: <E1mFT3a-0002S5-HX@gemulon.postgresql.org> (raw)

Refresh apply delay on reload of recovery_min_apply_delay at recovery

This commit ensures that the wait interval in the replay delay loop
waiting for an amount of time defined by recovery_min_apply_delay is
correctly handled on reload, recalculating the delay if this GUC value
is updated, based on the timestamp of the commit record being replayed.

The previous behavior would be problematic for example with replay
still waiting even if the delay got reduced or just cancelled.  If the
apply delay was increased to a larger value, the wait would have just
respected the old value set, finishing earlier.

Author: Soumyadeep Chakraborty, Ashwin Agrawal
Reviewed-by: Kyotaro Horiguchi, Michael Paquier
Discussion: https://postgr.es/m/CAE-ML+93zfr-HLN8OuxF0BjpWJ17O5dv1eMvSE5jsj9jpnAXZA@mail.gmail.com
Backpatch-through: 9.6

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/024fd44e0566fe2db264aaa3c6d45d0dfdd30b60

Modified Files
--------------
src/backend/access/transam/xlog.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1mFT3a-0002S5-HX@gemulon.postgresql.org>
Permalink:  ../E1mFT3a-0002S5-HX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mFT3a-0002S5-HX@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refresh apply delay on reload of recovery_min_apply_delay at rec
  In-Reply-To: <E1mFT3a-0002S5-HX@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