pg_archivecleanup not cleaning up ?

From: Jorge Torralba <jorge(dot)torralba(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: pg_archivecleanup not cleaning up ?
Date: 2013-10-01 18:18:40
Message-ID: CACut7uTb49xP4u7nU5YEg+LHnjpFuuiDVvb65pJVa8fXCHHhvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Running Postgres 9.2.4 on centos 6

We have a backup script that runs twice weekly. At the end of the script it
executes a pg_archivecleanup to remove the old WAL files no longer needed.

Most of the time this runs as expected. But for some reason, it does not
cleanup ALL of the old wal files.

I noticed today that I still had 3500 wal files. I ran the command
manually, and the screen scrolled by with its usual removing file message.

Afterwards, I did an ls | wc - l only to see it had only removed a few. In
the end, I had to run the same pg_archivecleanup about 5 times in order to
remove all of the old wal files.

Is there a known issues with this command?

Here is the command I ran.

pg_archivecleanup -d /opt/dbbackups/db1_wal_keep
000000010000002200000049.00000020.backup

--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential
information. If you are not the intended recipient, please do not print,
copy, retransmit, disseminate or otherwise use the information. Please
indicate to the sender that you have received this email in error and
delete the copy you received. Thank You.

Browse pgsql-admin by date

  From Date Subject
Next Message Alejandro Brust 2013-10-01 19:30:15 Re: PostgreSQL 9.2 - pg_dump out of memory when backuping a database with 300000000 large objects
Previous Message Albe Laurenz 2013-10-01 15:15:46 Re: Random server overload