On Fri, 2010-02-12 at 12:54 +0000, Simon Riggs wrote:
> So I suggest that you have a new action that gets called after every
> checkpoint to clear down the archive. It will remove all files from the
> archive prior to %r. We can implement that as a sequence of unlink()s
> from within the server, or we can just call a script to do it. I prefer
> the latter approach. However we do it, we need something initiated by
> the server to maintain the archive and stop it from overflowing.
Attached patch implements pg_standby for use as an
archive_cleanup_command, reusing existing code with new -a option.
e.g.
archive_cleanup_command = 'pg_standby -a -d /mnt/server/archiverdir %r'
Happy to add the archive_cleanup_command into main server as well, if
you like. Won't take long.
--
Simon Riggs www.2ndQuadrant.com