postgresql/src/include
Heikki Linnakangas b4c99c9af3 Tolerate timeline switches while "pg_basebackup -X fetch" is running.
If you take a base backup from a standby server with "pg_basebackup -X
fetch", and the timeline switches while the backup is being taken, the
backup used to fail with an error "requested WAL segment %s has already
been removed". This is because the server-side code that sends over the
required WAL files would not construct the WAL filename with the correct
timeline after a switch.

Fix that by using readdir() to scan pg_xlog for all the WAL segments in the
range, regardless of timeline.

Also, include all timeline history files in the backup, if taken with
"-X fetch". That fixes another related bug: If a timeline switch happened
just before the backup was initiated in a standby, the WAL segment
containing the initial checkpoint record contains WAL from the older
timeline too. Recovery will not accept that without a timeline history file
that lists the older timeline.

Backpatch to 9.2. Versions prior to that were not affected as you could not
take a base backup from a standby before 9.2.
2013-01-03 19:50:46 +02:00
..
access Tolerate timeline switches while "pg_basebackup -X fetch" is running. 2013-01-03 19:50:46 +02:00
bootstrap Fix management of pendingOpsTable in auxiliary processes. 2012-07-18 15:28:17 -04:00
catalog Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-29 10:37:13 -05:00
commands Fix ALTER EXTENSION / SET SCHEMA 2012-10-31 10:48:41 -03:00
datatype Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
executor Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
foreign Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
lib Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
libpq Produce a more useful error message for over-length Unix socket paths. 2012-11-29 19:57:10 -05:00
mb Back-patch addition of pg_wchar-to-multibyte conversion functionality. 2012-07-10 16:52:36 -04:00
nodes Prevent failure when RowExpr or XmlExpr is parse-analyzed twice. 2012-12-23 14:07:31 -05:00
optimizer Fix SELECT DISTINCT with index-optimized MIN/MAX on inheritance trees. 2012-11-26 12:58:08 -05:00
parser Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
port Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Improve coding around the fsync request queue. 2012-07-17 16:57:10 -04:00
regex Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:39 -04:00
replication syncrep.h must include xlogdefs.h 2012-08-28 10:03:37 -04:00
rewrite Prevent CREATE TABLE LIKE/INHERITS from (mis) copying whole-row Vars. 2012-06-30 16:45:27 -04:00
snowball Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
storage Don't advance checkPoint.nextXid near the end of a checkpoint sequence. 2012-12-02 15:20:03 -05:00
tcop Revert patch for taking fewer snapshots. 2012-11-26 15:55:51 -05:00
tsearch Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
utils Fix failure to ignore leftover temp tables after a server crash. 2012-12-17 20:15:39 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Remove leftovers of BeOS port 2012-05-14 04:50:39 +03:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Fix management of pendingOpsTable in auxiliary processes. 2012-07-18 15:28:17 -04:00
pg_config.h.in Make configure probe for mbstowcs_l as well as wcstombs_l. 2012-08-31 14:18:02 -04:00
pg_config.h.win32 Stamp 9.2.2. 2012-12-03 15:16:10 -05:00
pg_config_manual.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pg_trace.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgstat.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
postgres.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00