postgres/src
Andres Freund 2a0bfa4d66 Prevent WAL files created by pg_basebackup -x/X from being archived again.
WAL (and timeline history) files created by pg_basebackup did not
maintain the new base backup's archive status. That's currently not a
problem if the new node is used as a standby - but if that node is
promoted all still existing files can get archived again.  With a high
wal_keep_segment settings that can happen a significant time later -
which is quite confusing.

Change both the backend (for the -x/-X fetch case) and pg_basebackup
(for -X stream) itself to always mark WAL/timeline files included in
the base backup as .done. That's in line with walreceiver.c doing so.

The verbosity of the pg_basebackup changes show pretty clearly that it
needs some refactoring, but that'd result in not be backpatchable
changes.

Backpatch to 9.1 where pg_basebackup was introduced.

Discussion: 20141205002854.GE21964@awork2.anarazel.de
2015-01-03 20:54:13 +01:00
..
backend Prevent WAL files created by pg_basebackup -x/X from being archived again. 2015-01-03 20:54:13 +01:00
bin Improve consistency of parsing of psql's magic variables. 2014-12-31 12:17:08 -05:00
include Fix off-by-one loop count in MapArrayTypeName, and get rid of static array. 2014-12-16 15:35:46 -05:00
interfaces Fix minor bugs in commit 30bf4689a9 et al. 2014-11-30 12:20:57 -05:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:14:01 -05:00
pl Translation updates 2014-07-21 00:58:58 -04:00
port Suppress dead, unportable src/port/crypt.c code. 2014-10-12 23:27:30 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Have config_sspi_auth() permit IPv6 localhost connections. 2014-12-25 14:09:17 -05:00
timezone Add CST (China Standard Time) to our lists of timezone abbreviations. 2014-12-24 16:35:48 -05:00
tools Have config_sspi_auth() permit IPv6 localhost connections. 2014-12-25 14:09:17 -05:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Revert "Backpatch pgxs vpath build and installation fixes (v2)" 2013-10-07 22:39:30 -04:00
Makefile.shlib fix whitespace 2014-02-01 16:30:14 -05:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00