pgsql: Add the system identifier to backup manifests.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Add the system identifier to backup manifests.
Дата
Msg-id E1rkU2W-003ddP-R1@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Add the system identifier to backup manifests.

Before this patch, if you took a full backup on server A and then
tried to use the backup manifest to take an incremental backup on
server B, it wouldn't know that the manifest was from a different
server and so the incremental backup operation could potentially
complete without error. When you later tried to run pg_combinebackup,
you'd find out that your incremental backup was and always had been
invalid. That's poor timing, because nobody likes finding out about
backup problems only at restore time.

With this patch, you'll get an error when trying to take the (invalid)
incremental backup, which seems a lot nicer.

Amul Sul, revised by me. Review by Michael Paquier.

Discussion: http://postgr.es/m/CA+TgmoYLZzbSAMM3cAjV4Y+iCRZn-bR9H2+Mdz7NdaJFU1Zb5w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2041bc4276c95ac014510032e622a4baf70b29f1

Modified Files
--------------
doc/src/sgml/backup-manifest.sgml             | 17 +++++-
doc/src/sgml/ref/pg_verifybackup.sgml         |  7 ++-
src/backend/backup/backup_manifest.c          |  7 ++-
src/backend/backup/basebackup_incremental.c   | 40 +++++++++++++
src/bin/pg_basebackup/t/010_pg_basebackup.pl  | 16 ++++++
src/bin/pg_combinebackup/load_manifest.c      | 31 ++++++++++
src/bin/pg_combinebackup/load_manifest.h      |  1 +
src/bin/pg_combinebackup/pg_combinebackup.c   | 34 +++++++++--
src/bin/pg_combinebackup/t/005_integrity.pl   | 14 +++++
src/bin/pg_combinebackup/write_manifest.c     |  8 ++-
src/bin/pg_combinebackup/write_manifest.h     |  3 +-
src/bin/pg_verifybackup/pg_verifybackup.c     | 82 ++++++++++++++++++++++++++-
src/bin/pg_verifybackup/t/003_corruption.pl   | 26 ++++++++-
src/bin/pg_verifybackup/t/005_bad_manifest.pl |  6 +-
src/common/parse_manifest.c                   | 76 ++++++++++++++++++++++++-
src/include/common/parse_manifest.h           |  6 ++
16 files changed, 351 insertions(+), 23 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Hopefully make libpq_pipeline's new cancel test more reliable
Следующее
От: Nathan Bossart
Дата:
Сообщение: pgsql: Reintroduce MAINTAIN privilege and pg_maintain predefined role.