From a307141068b29cca39131b73995d21b58cdba006 Mon Sep 17 00:00:00 2001 From: Per Magnus Petersen Date: Sat, 7 Mar 2026 15:54:15 +0100 Subject: [PATCH] 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 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c747596..ffb1d9a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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