7be13fa1bbf379a078053c8a8fa09e7724faf770
The previous approach — pg_switch_wal + manual loop uploading pg_wal/* after barman-cloud-backup — lost the end_wal segment. pg_switch_wal triggers PG's WAL recycling: the just-closed segment file is renamed in-place to become the next active segment, so by the time the loop reads pg_wal/, the file named <end_wal> no longer exists. Configure archive_mode=on with archive_command=barman-cloud-wal-archive during initdb, then force pg_switch_wal after barman-cloud-backup and wait for archive_status/*.ready files to drain. PG archives each segment synchronously on close, so the end_wal segment uploads before the recycle happens. Fixes the CNPG recovery error "object storage or file not found <wal>: WAL not found" with the skipEmptyWalArchiveCheck annotation already in place. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
38 MiB