Tom Lane wrote: > Wayne Conrad <wconrad@xxxxxxxxx> writes: >> On Mon, Jul 31, 2006 at 10:18:31PM +0200, Christian Kastner wrote: >>> After the online backup script runs, all subsequent attempts to run >>> archive_command fail because the first thing it tries to archive away is >>> the still-existing *.backup file. This fails because a copy already >>> exists in the archive area and the script refuses to overwrite the >>> existing file. > >> I'm seeing this too. I thought I was doing something wrong. > > I'm not entirely convinced by Simon's theory that this is already fixed, > because there are some points that you didn't mention. > > First off, the thing isn't *supposed* to remove the latest .backup file; > that one, and its .done file, should stick around until your next > successful pg_stop_backup call. pg_stop_backup removes all but the > just-created .backup file (if they have .done files, showing they've > been archived). No other operation touches them at all. That's not what I'm seeing. The following log messages are repeated every few minutes after a successful backup run: LOG: Archivbefehl >/usr/local/bin/archive_wal.sh pg_xlog/000000010000000200000009.0018C208.backup 000000010000000200000009.0018C208.backup< fehlgeschlagen: Fehlercode 256 File already exists ... LOG: Archivbefehl >/usr/local/bin/archive_wal.sh pg_xlog/000000010000000200000009.0018C208.backup 000000010000000200000009.0018C208.backup< fehlgeschlagen: Fehlercode 256 WARNUNG: Transaktionslogdatei >000000010000000200000009.0018C208.backup< konnte nicht archiviert werden: zu viele Fehler (CK: too many errors) 0018C208.backup is the file created by pg_stop_backup (which is immediately stored in my archive area), archive_wal.sh is the script I supply to archive_command. This script refuses to overwrite existing files, as recommended by the manual. I assume the above messages are generated by "normal" archive_command runs, which fail because the .backup file has already been archived. Further WAL archiving fails until I delete the .backup file. Hope this info helps! Chris -- Christian Kastner PGP Key: AE90E13F