Re: pg_xlog not cleaned up

From: Christian Kastner <techmail(at)kvr(dot)at>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_xlog not cleaned up
Date: 2006-07-31 20:18:31
Message-ID: 44CE6597.5050600@kvr.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian wrote:
> What PostgreSQL version are you using? I know the *.backup file removal
> was added in 8.1:
>
> * Remove old "*.backup" files when we do pg_stop_backup() (Bruce)
> This prevents a large number of "*.backup" files from existing in
> "/pg_xlog".
>
> but the existance of the files should not cause problems.

It's 8.1.4, running on FC 5.

It does not cause any active problems, but the WAL archiving fails until
the *.backup and *.done files are removed manually, after which all the
"ready" WAL segments are archived away normally.

The script I supply to archive_command just mounts a windows share,
performs a cp (similar to the example in the PITR doc) and unmounts the
share again.

The online backup script basically just calls pg_start_backup(),
tar-gzips $PGDATA, then calls pg_stop_backup(). During that process, a
*.backup file is copied to the archive area (the windows share) using
the script supplied to archive_command.

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 thought it might be network-related (by the added delay), but simply
running pg_start_backup() and pg_stop_backup() - without actually doing
anything in between - produced the same result: I get a *.backup and
*.done file which aren't removed.

This only applies to *.backup / *.done pairs. I watched WAL segments go
from *.ready to *.done, after which the *.done files were removed from
pg_xlog/archive_status.

Best Regards,
Chris

--
Christian Kastner
PGP Key: AE90E13f

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harald Armin Massa 2006-07-31 20:30:55 Re: Error in PostgreSQL query with psycopg
Previous Message Bruce Momjian 2006-07-31 19:55:08 Re: pg_xlog not cleaned up