On Thu, Sep 4, 2014 at 7:27 AM, Kevin Harriss <[email protected]> wrote:
> On our postgres slave we have it configured to build initial with wal-e and
> then once caught up use a connection with the primary to stay updated. I
> noticed today that our pg_xlog directory is over 60GBs and no segments have
> been removed since June. I just confirmed that the sync with the primary is
> working correctly it just doesn't seem to clean up the xlogs. My
> recovery.conf is below. I also noticed these lines in the postgres log but
> couldn't find out what the return code meant, archive_cleanup_command
> "pg_archivecleanup /var/lib/postgresql/9.3/archive/ %r": return code 32512.
> Any ideas on what could be causing these segment files to stick around and
> how to fix it.
>
>
>
> standby_mode = 'on' # enables stand-by (readonly) mode
>
> # Connect to the master postgres server using the replicator user we
> created.
> primary_conninfo = 'host=<primary_connection> port=<primary_port>
> user=<primary_user> password=<primary_password>'
>
> # Specifies a trigger file whose presence should cause streaming replication
> to
> # end (i.e., failover).
> trigger_file = '/tmp/pg_failover_trigger'
>
> # Shell command to execute an archived segment of WAL file series.
> # Required for archive recovery if streaming replication falls behind too
> far.
> restore_command = '/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e
> wal-fetch "%f" "%p"'
> archive_cleanup_command = 'pg_archivecleanup
> /var/lib/postgresql/9.3/archive/ %r'

You shouldn't need archive cleanup since that's, as I understand it,
to remove stuff from the archive, e.g. like "wal-e delete".  I
personally do not use archive_cleanup, instead preferring to run
"delete" commands via cron or a similar system.

pg_xlog in particular is not typically cleaned up by
archive_cleanup_command.  I'm not sure why your pg_xlog is growing so
large, perhaps you have wal_keep_segments at some ginormous number?

-- 
You received this message because you are subscribed to the Google Groups 
"wal-e" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to