pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add the system identifier to backup manifests.
Date: Wed, 13 Mar 2024 19:13:25 +0000
Message-ID: <E1rkU2W-003ddP-R1@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)

Message-ID: <E1rkU2W-003ddP-R1@gemulon.postgresql.org>
Permalink:  ../E1rkU2W-003ddP-R1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rkU2W-003ddP-R1@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add the system identifier to backup manifests.
  In-Reply-To: <E1rkU2W-003ddP-R1@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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