pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi 5+ messages / 1 participants [nested] [flat]
* pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi @ 2015-01-03 20:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2015-01-03 20:40 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2c0a4858965f1375dadb45df9f3a054bfcb283f5 Modified Files -------------- src/backend/replication/basebackup.c | 24 ++++++++ src/bin/pg_basebackup/pg_basebackup.c | 33 +++++++---- src/bin/pg_basebackup/pg_receivexlog.c | 2 +- src/bin/pg_basebackup/receivelog.c | 97 +++++++++++++++++++++++++------- src/bin/pg_basebackup/receivelog.h | 3 +- 5 files changed, 127 insertions(+), 32 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi @ 2015-01-03 20:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2015-01-03 20:40 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/90e4a2bf9b131f45fd4d80815b2b3505bb98c0a6 Modified Files -------------- src/backend/replication/basebackup.c | 24 +++++++++++ src/bin/pg_basebackup/pg_basebackup.c | 33 +++++++++----- src/bin/pg_basebackup/pg_receivexlog.c | 3 +- src/bin/pg_basebackup/receivelog.c | 74 +++++++++++++++++++++++++++----- src/bin/pg_basebackup/receivelog.h | 3 +- 5 files changed, 115 insertions(+), 22 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi @ 2015-01-03 20:40 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2015-01-03 20:40 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f6cea45029dfc0ad09ef24f73cac936c676f83ed Modified Files -------------- src/backend/replication/basebackup.c | 24 +++++++++++ src/bin/pg_basebackup/pg_basebackup.c | 32 ++++++++++---- src/bin/pg_basebackup/pg_receivexlog.c | 3 +- src/bin/pg_basebackup/receivelog.c | 74 +++++++++++++++++++++++++++----- src/bin/pg_basebackup/receivelog.h | 3 +- 5 files changed, 115 insertions(+), 21 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi @ 2015-01-03 20:41 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2015-01-03 20:41 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f961ad4790bddd540ebc5c3b44f752a3869fa866 Modified Files -------------- src/backend/replication/basebackup.c | 24 ++++++++++++++ src/bin/pg_basebackup/pg_basebackup.c | 48 ++++++++++++++++++++++------ src/bin/pg_basebackup/pg_receivexlog.c | 2 +- src/bin/pg_basebackup/receivelog.c | 54 +++++++++++++++++++++++++++++--- src/bin/pg_basebackup/receivelog.h | 3 +- 5 files changed, 115 insertions(+), 16 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi @ 2015-01-03 20:41 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2015-01-03 20:41 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/2a0bfa4d66bd75e9f1a0ff8a8fcfdb9c4fffa5be Modified Files -------------- src/backend/replication/basebackup.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2015-01-03 20:41 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-01-03 20:40 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi Andres Freund <andres@anarazel.de> 2015-01-03 20:40 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi Andres Freund <andres@anarazel.de> 2015-01-03 20:40 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi Andres Freund <andres@anarazel.de> 2015-01-03 20:41 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi Andres Freund <andres@anarazel.de> 2015-01-03 20:41 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox