Thread: Re: [COMMITTERS] pgsql: If recovery_target_timeline is set to 'latest' and standby mode

On Mon, 2011-03-07 at 19:16 +0000, Heikki Linnakangas wrote:

> 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.

This appears to rely on the existence of an archive, which isn't always
there. That isn't documented nor checked for that I can see.

If the idea is to support downstream standbys via file based replication
it should really say that. Shame it doesn't support streaming only.

There's also a comment in the code about something the admin needs to
make sure doesn't happen. That needs to be in the docs also.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services