You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feat]: check empty WAL destination when bootstrap method is pg_basebackup #8897
I have searched for an existing issue, and could not find anything. I believe this is a new issue.
What problem is this feature going to solve? Why should it be added?
When bootstrapping a PostgreSQL instance using the pg_basebackup bootstrap method, the validation that ensures the empty WAL archive destination doesn't run. That validation runs for other bootstrap methods (initdb, recovery) but is skipped for pg_basebackup. As a result, users can supply a configuration that points to an archive containing unrelated files, which can cause issues that are very hard to debug.
Describe the solution you'd like
Ensure that the archive destination path is empty also when the bootstrap method is pg_basebackup
changed the title [-][Bug]: empty WAL destination check not performed when bootstrap method is pg_basebackup[/-][+][Feat]: check empty WAL destination when bootstrap method is pg_basebackup[/+]on Oct 21, 2025
You are correct—there is currently no validation for an empty WAL archive destination when using the pg_basebackup bootstrap method. The codebase implements this check for other bootstrap methods like initdb and recovery (using barman-cloud-check-wal-archive), but the pg_basebackup path does not invoke any similar validation or safety check before or after cloning the data directory. This means users can configure a WAL archive destination that already contains unrelated files, which can lead to subtle and hard-to-debug issues. This gap appears to be an oversight or unimplemented feature, not an intentional design decision. For reference, see the pg_basebackup bootstrap implementation and the WAL archive validation logic used in recovery.
Activity
[-][Bug]: empty WAL destination check not performed when bootstrap method is pg_basebackup[/-][+][Feat]: check empty WAL destination when bootstrap method is pg_basebackup[/+]dosubot commentedon Oct 21, 2025
You are correct—there is currently no validation for an empty WAL archive destination when using the
pg_basebackupbootstrap method. The codebase implements this check for other bootstrap methods likeinitdbandrecovery(usingbarman-cloud-check-wal-archive), but the pg_basebackup path does not invoke any similar validation or safety check before or after cloning the data directory. This means users can configure a WAL archive destination that already contains unrelated files, which can lead to subtle and hard-to-debug issues. This gap appears to be an oversight or unimplemented feature, not an intentional design decision. For reference, see the pg_basebackup bootstrap implementation and the WAL archive validation logic used in recovery.To reply, just mention @dosu.
Docs are dead. Just use Dosu.
feat: ensure destination WAL archive path is empty on pg_basebackup b…
feat: ensure destination WAL archive path is empty on pg_basebackup b…
feat: ensure destination WAL archive path is empty on pg_basebackup b…
feat: ensure destination WAL archive path is empty on pg_basebackup b…