Wednesday, December 28, 2011

Postgresql - pg_archivecleanup

I left open one question raised when configuring log shipping. How to prevent the wal directory from consuming all the available space?


http://www.postgresql.org/docs/devel/static/pgarchivecleanup.html


F.25. pg_archivecleanup

pg_archivecleanup is designed to be used as an archive_cleanup_command to clean up WAL file archives when running as a standby server (see Section 25.2). pg_archivecleanup can also be used as a standalone program to clean WAL file archives.

F.25.1. Usage

To configure a standby server to use pg_archivecleanup, put this into its recovery.conf configuration file:

archive_cleanup_command = 'pg_archivecleanup archivelocation %r'

where archivelocation is the directory from which WAL segment files should be removed.


It looks like you have to specify up to what file you intent to remove from the wal history.

No comments:

Post a Comment