postgresql/src/backend
Heikki Linnakangas 4d894b41cd Change the order that pg_xlog and WAL archive are polled for WAL segments.
If there is a WAL segment with same ID but different TLI present in both
the WAL archive and pg_xlog, prefer the one with higher TLI. Before this
patch, the archive was polled first, for all expected TLIs, and only if no
file was found was pg_xlog scanned. This was a change in behavior from 9.3,
which first scanned archive and pg_xlog for the highest TLI, then archive
and pg_xlog for the next highest TLI and so forth. This patch reverts the
behavior back to what it was in 9.2.

The reason for this is that if for example you try to do archive recovery
to timeline 2, which branched off timeline 1, but the WAL for timeline 2 is
not archived yet, we would replay past the timeline switch point on
timeline 1 using the archived files, before even looking timeline 2's files
in pg_xlog

Report and patch by Kyotaro Horiguchi. Backpatch to 9.3 where the behavior
was changed.
2014-02-14 15:15:09 +02:00
..
access Change the order that pg_xlog and WAL archive are polled for WAL segments. 2014-02-14 15:15:09 +02:00
bootstrap Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:36:07 -05:00
catalog Introduce replication slots. 2014-01-31 22:45:36 -05:00
commands Separate multixact freezing parameters from xid's 2014-02-13 19:36:31 -03:00
executor Fix *-qualification of named parameters in SQL-language functions. 2014-02-03 14:47:17 -05:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib Update copyright for 2014 2014-01-07 16:05:30 -05:00
libpq Disallow use of SSL v3 protocol in the server as well as in libpq. 2014-01-31 17:51:18 -05:00
main Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:36:07 -05:00
nodes Separate multixact freezing parameters from xid's 2014-02-13 19:36:31 -03:00
optimizer Fix bogus handling of "postponed" lateral quals. 2014-01-30 14:51:16 -05:00
parser Separate multixact freezing parameters from xid's 2014-02-13 19:36:31 -03:00
po Translation updates 2013-12-02 00:17:07 -05:00
port Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
postmaster Separate multixact freezing parameters from xid's 2014-02-13 19:36:31 -03:00
regex Make various variables const (read-only). 2014-01-18 16:04:32 -05:00
replication Make pg_basebackup skip temporary statistics files. 2014-02-03 23:19:49 +09:00
rewrite Update copyright for 2014 2014-01-07 16:05:30 -05:00
snowball Update copyright for 2014 2014-01-07 16:05:30 -05:00
storage Mark some more variables as static or include the appropriate header 2014-02-08 21:21:46 -05:00
tcop Add ALTER TABLESPACE ... MOVE command 2014-01-18 18:56:40 -05:00
tsearch Use memmove() instead of memcpy() for copying overlapping regions. 2014-02-10 09:57:59 +02:00
utils Add C comment about problems with CHAR() space trimming 2014-02-13 21:46:03 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00