postgresql/src/backend
Heikki Linnakangas 223431cba1 Request XLOG switch before writing checkpoint in pg_start_backup(). Otherwise
you can end up with an unrecoverable backup if you start a new base backup
right after finishing archive recovery. In that scenario, the redo pointer of
the checkpoint that pg_start_backup() writes points to the XLOG segment where
the timeline-changing end-of-archive-recovery checkpoint is. The beginning
of that segment contains pages with the old timeline ID, and we don't accept
that in recovery unless we find a history file covering the old timeline ID.
If you omit pg_xlog from the base backup and clear the archive directory
before starting the backup, there will be no such history file available.

The bug is present in all versions since PITR was introduced in 8.0, but I'm
back-patching only back to 8.2. Earlier versions didn't have XLOG switch
records, making this fix unfeasible. Given the lack of reports until now,
it doesn't seem worthwhile to spend more effort to fix 8.0 and 8.1.

Per report and suggestion by Mikael Krantz
2009-05-07 11:25:25 +00:00
..
access Request XLOG switch before writing checkpoint in pg_start_backup(). Otherwise 2009-05-07 11:25:25 +00:00
bootstrap Start background writer during archive recovery. Background writer now performs 2009-02-18 15:58:41 +00:00
catalog Fix estimate_num_groups() to not fail on PlaceHolderVars, per report from 2009-04-19 19:46:33 +00:00
commands Modify CREATE DATABASE to enforce that the source database's encoding setting 2009-05-06 16:15:21 +00:00
executor XMLATTRIBUTES() should send the attribute values through 2009-04-08 21:51:38 +00:00
foreign Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
lib Update copyright for 2009. 2009-01-01 17:24:05 +00:00
libpq Suppress some 'variable may be used uninitialized' warnings from gcc 4.4. 2009-04-23 23:25:13 +00:00
main Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nodes Fix planner to restore its previous level of intelligence about pushing 2009-04-16 20:42:16 +00:00
optimizer Tweak distribute_qual_to_rels so that when we decide a pseudoconstant qual 2009-05-06 20:31:18 +00:00
parser Make new complaint about unsafe Unicode literals include an error location. 2009-05-05 21:09:23 +00:00
po Translation updates for 8.4 beta 2009-04-09 19:38:53 +00:00
port Minor improvement: avoid assuming that GetLastError value cannot be 2009-05-05 21:51:46 +00:00
postmaster Install a "dead man switch" to allow the postmaster to detect cases where 2009-05-05 19:59:00 +00:00
regex Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
rewrite Get rid of the rather fuzzily defined FlattenedSubLink node type in favor of 2009-02-25 03:30:38 +00:00
snowball Update copyright for 2009. 2009-01-01 17:24:05 +00:00
storage Install an atexit(2) callback that ensures that proc_exit's cleanup processing 2009-05-05 20:06:07 +00:00
tcop Fix possible failures when a tuplestore switches from in-memory to on-disk 2009-03-27 18:30:21 +00:00
tsearch Some languages have symbols with zero display's width or/and vowels/signs which 2009-03-11 16:03:40 +00:00
utils Install a "dead man switch" to allow the postmaster to detect cases where 2009-05-05 19:59:00 +00:00
common.mk Code coverage testing with gcov. Documentation is in the regression test 2008-09-05 12:11:18 +00:00
Makefile Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nls.mk Translation updates for 8.4 beta 2009-04-09 19:38:53 +00:00