Fix WAL archive_command failing when segment already exists

pg_basebackup -Xs copies WAL segments to the backup dir, causing
the archive_command to fail on those pre-existing files and block
all subsequent archiving.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 15:54:15 +01:00
co-authored by Claude Opus 4.6
parent 82e430e645
commit a307141068
+1 -1
View File
@@ -21,7 +21,7 @@ services:
- -c
- archive_mode=on
- -c
- archive_command=test ! -f /backup/wal/%f && cp %p /backup/wal/%f
- archive_command=test -f /backup/wal/%f || cp %p /backup/wal/%f
postgres-backup:
image: postgres:18