pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add GUC to log long wait times on recovery conflicts.
Date: Thu, 07 Jan 2021 15:48:15 +0000
Message-ID: <E1kxXWJ-0001zw-FL@gemulon.postgresql.org> (raw)

Add GUC to log long wait times on recovery conflicts.

This commit adds GUC log_recovery_conflict_waits that controls whether
a log message is produced when the startup process is waiting longer than
deadlock_timeout for recovery conflicts. This is useful in determining
if recovery conflicts prevent the recovery from applying WAL.

Note that currently a log message is produced only when recovery conflict
has not been resolved yet even after deadlock_timeout passes, i.e.,
only when the startup process is still waiting for recovery conflict
even after deadlock_timeout.

Author: Bertrand Drouvot, Masahiko Sawada
Reviewed-by: Alvaro Herrera, Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/9a60178c-a853-1440-2cdc-c3af916cff59@amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0650ff23038bc3eb8d8fd851744db837d921e285

Modified Files
--------------
doc/src/sgml/config.sgml                      |  22 +++
doc/src/sgml/high-availability.sgml           |   6 +
src/backend/storage/buffer/bufmgr.c           |  30 ++++
src/backend/storage/ipc/standby.c             | 199 ++++++++++++++++++++++----
src/backend/storage/lmgr/proc.c               |  48 ++++++-
src/backend/utils/misc/guc.c                  |  10 +-
src/backend/utils/misc/postgresql.conf.sample |   2 +
src/include/storage/standby.h                 |   5 +-
8 files changed, 292 insertions(+), 30 deletions(-)



Message-ID: <E1kxXWJ-0001zw-FL@gemulon.postgresql.org>
Permalink:  ../E1kxXWJ-0001zw-FL@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kxXWJ-0001zw-FL@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: fujii@postgresql.org
  Subject: Re: pgsql: Add GUC to log long wait times on recovery conflicts.
  In-Reply-To: <E1kxXWJ-0001zw-FL@gemulon.postgresql.org>
  References: <E1kxXWJ-0001zw-FL@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