From 2041bc4276c95ac014510032e622a4baf70b29f1 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 13 Mar 2024 15:04:22 -0400 Subject: 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 --- doc/src/sgml/backup-manifest.sgml | 17 ++++++++++++++++- doc/src/sgml/ref/pg_verifybackup.sgml | 7 ++++--- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/backup-manifest.sgml b/doc/src/sgml/backup-manifest.sgml index 771be1310a1..d5ec244834e 100644 --- a/doc/src/sgml/backup-manifest.sgml +++ b/doc/src/sgml/backup-manifest.sgml @@ -37,7 +37,22 @@ PostgreSQL-Backup-Manifest-Version - The associated value is always the integer 1. + The associated value is an integer. Beginning in + PostgreSQL 17, + it is 2; in older versions, it is 1. + + + + + + System-Identifier + + + The database system identifier of the + PostgreSQL instance where the backup was + taken. This field is present only when + PostgreSQL-Backup-Manifest-Version is + 2. diff --git a/doc/src/sgml/ref/pg_verifybackup.sgml b/doc/src/sgml/ref/pg_verifybackup.sgml index 36335e0a188..a3f167f9f6e 100644 --- a/doc/src/sgml/ref/pg_verifybackup.sgml +++ b/doc/src/sgml/ref/pg_verifybackup.sgml @@ -53,9 +53,10 @@ PostgreSQL documentation Backup verification proceeds in four stages. First, pg_verifybackup reads the backup_manifest file. If that file - does not exist, cannot be read, is malformed, or fails verification - against its own internal checksum, pg_verifybackup - will terminate with a fatal error. + does not exist, cannot be read, is malformed, fails to match the system + identifier with pg_control of the backup directory or + fails verification against its own internal checksum, + pg_verifybackup will terminate with a fatal error. -- cgit v1.2.3