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:
+1
-1
@@ -21,7 +21,7 @@ services:
|
|||||||
- -c
|
- -c
|
||||||
- archive_mode=on
|
- archive_mode=on
|
||||||
- -c
|
- -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:
|
postgres-backup:
|
||||||
image: postgres:18
|
image: postgres:18
|
||||||
|
|||||||
Reference in New Issue
Block a user