From: dwsteele (@dwsteele) <noreply+dwsteele@github.com>
To: pgbackrest/pgbackrest <noreply+pgbackrest-pgbackrest@github.com>
Subject: [pgbackrest/pgbackrest] PR #2915: Add a minimum repository format for options.
Date: Tue, 10 Nov 2026 12:26:39 +0000
Message-ID: <gh-pgbackrest-pgbackrest-2915@github.com> (raw)
Options that are only valid for some repository formats were checked in command code, e.g. expire warned when repo-cipher-rotate was set for a repository at format 5. The documentation also had to state the required format by hand.
Add a format key to config.yaml that sets the minimum repository format for an option in the repo group. The option is parsed as usual but cannot be accessed until the format of its repository is set with cfgRepoFormatSet(). When the repository format is lower, an option set on the command line is an error and otherwise the option is unset with a warning if the source is not default. The minimum format is shown in the option reference and in option command-line help.
Set the minimum format of repo-cipher-rotate to 6. Expire sets the repository format after loading backup.info and archive.info and checking that they are at the same format. An interrupted stanza-upgrade leaves archive.info at the new format and backup.info at the prior format, which is now an error for the repository with a hint to complete the upgrade, as backup and check already do. Since archive.info is now loaded before backups are expired, a missing archive.info also stops expire for the repository before any backups are expired.
Options that are not valid on a remote are no longer considered when building the remote parameters, since a remote is started before the repository format is known.