Fix sloppiness in the timeline switch over streaming replication patch.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 1ff92eea140ccf0503b7399549031976e5c6642e
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2012-12-21T18:08:12Z
Releases: 9.3.0
Fix sloppiness in the timeline switch over streaming replication patch.

Here's another attempt at fixing the logic that decides how far the WAL can
be streamed, which was still broken if the timeline changed while streaming.
You would get an assertion failure. The way the logic is now written is more
readable, too.

Thom Brown reported the assertion failure.

Files

PathChange+/−
src/backend/replication/walsender.c modified +54 −47