postgresql/src
Heikki Linnakangas 2ffa66f497 Fix walsender failure at promotion.
If a standby server has a cascading standby server connected to it, it's
possible that WAL has already been sent up to the next WAL page boundary,
splitting a WAL record in the middle, when the first standby server is
promoted. Don't throw an assertion failure or error in walsender if that
happens.

Also, fix a variant of the same bug in pg_receivexlog: if it had already
received WAL on previous timeline up to a segment boundary, when the
upstream standby server is promoted so that the timeline switch record falls
on the previous segment, pg_receivexlog would miss the segment containing
the timeline switch. To fix that, have walsender send the position of the
timeline switch at end-of-streaming, in addition to the next timeline's ID.
It was previously assumed that the switch happened exactly where the
streaming stopped.

Note: this is an incompatible change in the streaming protocol. You might
get an error if you try to stream over timeline switches, if the client is
running 9.3beta1 and the server is more recent. It should be fine after a
reconnect, however.

Reported by Fujii Masao.
2013-05-08 20:30:17 +03:00
..
backend Fix walsender failure at promotion. 2013-05-08 20:30:17 +03:00
bin Fix walsender failure at promotion. 2013-05-08 20:30:17 +03:00
common Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
include Use the term "radix tree" instead of "suffix tree" for SP-GiST text opclass. 2013-05-08 14:34:26 +03:00
interfaces Translation updates 2013-05-05 22:34:23 -04:00
makefiles Blind attempt at fixing the non-MSVC Windows builds 2013-02-22 11:51:15 -03:00
pl Translation updates 2013-05-05 22:34:23 -04:00
port initdb needs pqsignal() even on Windows. 2013-03-17 15:19:47 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Use the term "radix tree" instead of "suffix tree" for SP-GiST text opclass. 2013-05-08 14:34:26 +03:00
timezone Update time zone data files to tzdata release 2013b. 2013-03-28 15:25:48 -04:00
tools pgindent: add newline to die() so script line number is not reported on failure. 2013-04-16 10:30:35 -04:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Compiler optimizations for page checksum code. 2013-04-30 06:59:26 +01:00
Makefile.shlib Add pkg-config files for libpq and ecpg libraries 2013-03-31 16:58:40 -04:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00