Add GUC to control the time to wait before retrieving WAL after failed attempt

Enterprise / PostgreSQL - Fujii Masao [postgresql.org] - 23 February 2015 05:55 UTC

Previously when the standby server failed to retrieve WAL files from any sources (i.e., streaming replication, local pg_xlog directory or WAL archive), it always waited for five seconds (hard-coded) before the next attempt. For example, this is problematic in warm-standby because restore_command can fail every five seconds even while new WAL file is expected to be unavailable for a long time and flood the log files with its error messages.

This commit adds new parameter, wal_retrieve_retry_interval, to control that wait time.

Alexey Vasiliev and Michael Paquier, reviewed by Andres Freund and me.

5d2b45e Add GUC to control the time to wait before retrieving WAL after failed attempt.
doc/src/sgml/config.sgml | 18 ++++++++++++
src/backend/access/transam/xlog.c | 37 ++++++++++++++++---------
src/backend/utils/misc/guc.c | 12 ++++++++
src/backend/utils/misc/postgresql.conf.sample | 2 ++
src/include/access/xlog.h | 1 +
5 files changed, 57 insertions(+), 13 deletions(-)

Upstream: git.postgresql.org


  • Share