Add GUC to log long wait times on recovery conflicts.
authorFujii Masao <fujii@postgresql.org>
Thu, 7 Jan 2021 15:47:03 +0000 (00:47 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 7 Jan 2021 15:47:03 +0000 (00:47 +0900)
commit0650ff23038bc3eb8d8fd851744db837d921e285
tree1df2b5ccd7a20ee538c93339b115ca4f274a5aa6
parentf7a1a805cb178653ea2a6c8991ad73b035af953e
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
doc/src/sgml/config.sgml
doc/src/sgml/high-availability.sgml
src/backend/storage/buffer/bufmgr.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/proc.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/storage/standby.h