k.rennerandClaude Opus 4.7 7be13fa1bb
ci/woodpecker/manual/migrate-authentik-db Pipeline failed
ci/woodpecker/manual/migrate-paperless Pipeline failed
fix(migrate): Use PG native archive_mode so end_wal ships to archive
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>
2026-04-21 11:37:05 +02:00
S
Description
No description provided
38 MiB
master
Latest
2026-01-31 15:05:31 +00:00
Languages
Go 35.3%
Shell 24.5%
Python 22.5%
Jinja 5.1%
HCL 4.8%
Other 7.7%