Re: pg_xlog not cleaned up

From: Christian Kastner <techmail(at)kvr(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Wayne Conrad <wconrad(at)yagni(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_xlog not cleaned up
Date: 2006-08-04 16:49:04
Message-ID: 44D37A80.8090000@kvr.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Wayne Conrad <wconrad(at)yagni(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message RPK 2006-08-04 18:01:52 Scheduling Automatic Backups
Previous Message gustavo halperin 2006-08-04 16:35:16 Re: Create function problem