Thread: Frequency of archive_cleanup_command

Frequency of archive_cleanup_command

From
A J
Date:
Couple of questions:
1. At what frequency is the archive_cleanup_command executed from the recovery.conf file on the standby ?
2. If for some reason lets say a WAL file is missing from the archive directory but the files after that are present. When the standby tries to restore the missing WAL file, does it fail or it simply skips the missing WAL file and goes to the next one.

Thanks.

Re: Frequency of archive_cleanup_command

From
Raghavendra
Date:
2. If for some reason lets say a WAL file is missing from the archive directory but the files after that are present. When the standby tries to restore the missing WAL file, does it fail or it simply skips the missing WAL file and goes to the next one.

I wont think it is possible if you are missing any one of the WALs in restoration process.

---
Regards,
Raghavendra
EnterpriseDB Corporation



Re: Frequency of archive_cleanup_command

From
Jerry Sievers
Date:
A J <s5aly@yahoo.com> writes:

> Couple of questions: 1. At what frequency is the
> archive_cleanup_command executed from the recovery.conf file on the
> standby ?

Typically once per WAL file being processed.

> 2. If for some reason lets say a WAL file is missing from the
> archive directory but the files after that are present.  When the
> standby tries to restore the missing WAL file, does it fail or it
> simply skips the missing WAL file and goes to the next one.

Neither.

A standby will sit waiting forever for the next WAL segment that it
needs.

You can't just skip missing WALs :-)

HTH

> Thanks.
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 305.321.1144

Re: Frequency of archive_cleanup_command

From
Simon Riggs
Date:
On Wed, Aug 10, 2011 at 6:36 PM, A J <s5aly@yahoo.com> wrote:

> Couple of questions:
> 1. At what frequency is the archive_cleanup_command executed from the
> recovery.conf file on the standby ?
> 2. If for some reason lets say a WAL file is missing from the archive
> directory but the files after that are present. When the standby tries to
> restore the missing WAL file, does it fail or it simply skips the missing
> WAL file and goes to the next one.

It fails. The gap must be repaired manually, or you're out of luck.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services