pgsql: Now that START_REPLICATION returns the next timeline's ID after - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Now that START_REPLICATION returns the next timeline's ID after
Date
Msg-id E1Tw8jj-0003nG-PH@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Now that START_REPLICATION returns the next timeline's ID after reaching end
of timeline, take advantage of that in walreceiver.

Startup process is still in control of choosign the target timeline, by
scanning the timeline history files present in pg_xlog, but walreceiver now
uses the next timeline's ID to fetch its history file immediately after it
has finished streaming the old timeline. Before, the standby would first try
to restart streaming on the old timeline, which fetches the missing timeline
history file as a side-effect, and only then restart from the new timeline.
This patch eliminates the extra iteration, which speeds up the timeline
switch and reduces the noise in the log caused by the extra restart on the
old timeline.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6f7cddc7ae27a42ac2af72b675b9c08138a0c439

Modified Files
--------------
.../libpqwalreceiver/libpqwalreceiver.c            |   64 +++++++++++--------
src/backend/replication/walreceiver.c              |    9 +++-
src/include/replication/walreceiver.h              |    2 +-
3 files changed, 46 insertions(+), 29 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Use the right timeline when beginning to stream from master.
Next
From: Bruce Momjian
Date:
Subject: pgsql: psql latex fixes