pg.ddx.io  pgbackrest/pgbackrest GitHub issues and pull requests  
help / color / mirror / Atom feed
From: pgstef (@pgstef) <noreply+pgstef@github.com>
To: pgbackrest/pgbackrest <noreply+pgbackrest-pgbackrest@github.com>
Subject: Re: [pgbackrest/pgbackrest] PR #2898: Add stanza-rekey command to change the repository passphrase.
Date: Fri, 06 Nov 2026 15:12:12 +0000
Message-ID: <gh-pgbackrest-pgbackrest-2898-c6688140683@github.com> (raw)
In-Reply-To: <gh-pgbackrest-pgbackrest-2898@github.com>
References: <gh-pgbackrest-pgbackrest-2898@github.com>

I haven't had time for an in-depth code review yet, but one thing concerns me about the current implementation.

While `repo-cipher-pass-old` is configured, a regular backup can already re-encrypt both `backup.info` and `archive.info` using the new passphrase. An `expire` can also rewrite `backup.info` with the new passphrase.
This effectively rekeys the info files before `stanza-rekey` is explicitly executed. If not every host has been updated with the new configuration yet, the remaining hosts would lose access to the repository. On a PostgreSQL host, this could cause `archive-push` to fail.

What concerns me is that this happens without any explicit indication at the usual logging levels. The fallback message is now logged at DEBUG, while the `check` warning only indicates that `repo-cipher-pass-old` is configured, not whether the info files have already been re-encrypted.

Wouldn't it make more sense to preserve the passphrase used to decrypt an info file when saving it, and leave the actual rekeying to `stanza-rekey`? That would make the command the explicit cutover point, as the documentation seems to suggest.

Am I missing something here?

view thread (19+ messages)  latest in thread

Message-ID: <gh-pgbackrest-pgbackrest-2898-c6688140683@github.com>
Permalink:  ../gh-pgbackrest-pgbackrest-2898-c6688140683@github.com/

 · 


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