]> granicus.if.org Git - postgresql/commit
Replace max_standby_delay with two parameters, max_standby_archive_delay and
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Jul 2010 20:43:58 +0000 (20:43 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Jul 2010 20:43:58 +0000 (20:43 +0000)
commite76c1a0f4d2127f11c72c02b3d73a5dcb4517173
tree7a81ef438a2ef591dda9f8cf1c9e4eecfc5082e7
parente6a7416e28bacef6311be20375c8498b23faeb65
Replace max_standby_delay with two parameters, max_standby_archive_delay and
max_standby_streaming_delay, and revise the implementation to avoid assuming
that timestamps found in WAL records can meaningfully be compared to clock
time on the standby server.  Instead, the delay limits are compared to the
elapsed time since we last obtained a new WAL segment from archive or since
we were last "caught up" to WAL data arriving via streaming replication.
This avoids problems with clock skew between primary and standby, as well
as other corner cases that the original coding would misbehave in, such
as the primary server having significant idle time between transactions.
Per my complaint some time ago and considerable ensuing discussion.

Do some desultory editing on the hot standby documentation, too.
12 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/high-availability.sgml
src/backend/access/transam/xlog.c
src/backend/replication/walreceiver.c
src/backend/replication/walreceiverfuncs.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/access/xlog.h
src/include/replication/walreceiver.h
src/include/storage/standby.h