OSDN Git Service

If recovery_target_timeline is set to 'latest' and standby mode is enabled,
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 7 Mar 2011 19:02:40 +0000 (21:02 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 7 Mar 2011 19:14:47 +0000 (21:14 +0200)
commit1a4ab9ec23f0635a4c15b069df60b545814650e9
tree6d09c873cf835ea5962c0fd48995b29666f301fd
parentbcf85e3f44a518eb7bb759541189efb6726fe9bc
If recovery_target_timeline is set to 'latest' and standby mode is enabled,
periodically rescan the archive for new timelines, while waiting for new WAL
segments to arrive. This allows you to set up a standby server that follows
the TLI change if another standby server is promoted to master. Before this,
you had to restart the standby server to make it notice the new timeline.

This patch only scans the archive for TLI changes, it won't follow a TLI
change in streaming replication. That is much needed too, but it would be a
much bigger patch than I dare to sneak in this late in the release cycle.

There was discussion on improving the sanity checking of the WAL segments so
that the system would notice more reliably if the new timeline isn't an
ancestor of the current one, but that is not included in this patch.

Reviewed by Fujii Masao.
doc/src/sgml/high-availability.sgml
doc/src/sgml/recovery-config.sgml
src/backend/access/transam/xlog.c