[PATCH] Allow usage of archive .backup files as backup_label

From: Michael Banck <michael(dot)banck(at)credativ(dot)de>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Allow usage of archive .backup files as backup_label
Date: 2022-08-22 15:16:58
Message-ID: 63039dec.050a0220.31bb6.fa39@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The .backup files written to the archive (if archiving is on) are very
similar to the backup_label that's written/returned by
pg_stop_backup()/pg_backup_stop(), they just have a few extra lines
about the end of backup process that are missing from backup_label.

The parser in xlogrecovery.c however barfs on them because it does not
expect the additional STOP WAL LOCATION on line 2.

The attached makes parsing this line optional, so that one can use those
.backup files in place of backup_label. This is e.g. useful if the
backup_label got lost or the output of pg_stop_backup() was not
captured.

Michael

--
Team Lead PostgreSQL
Project Manager
Tel.: +49 2166 9901-171
Mail: michael(dot)banck(at)credativ(dot)de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Management: Dr. Michael Meskes, Geoff Richardson, Peter Lilley

Our handling of personal data is subject to:
https://www.credativ.de/en/contact/privacy/

Attachment Content-Type Size
0001-Allow-usage-of-archive-.backup-files-as-backup_label.patch text/x-diff 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-22 15:37:40 Re: Strip -mmacosx-version-min options from plperl build
Previous Message Tom Lane 2022-08-22 15:13:05 Re: Remove offsetof definition