From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | John Scalia <jayknowsunix(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: WAL segment management on a standby |
Date: | 2014-07-14 02:18:16 |
Message-ID: | 53C33DE8.7000902@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 07/12/2014 12:49 AM, John Scalia wrote:
> Again, thanks to all to have assisted me with getting the WAL segments
> to both my standby servers. Everything with that is now working quite
> well. I do have a related followup question, however. On these standby's
> nothing is built in to manage those WAL segments in the archive
> directory. Thus, that directory can grow to the point where it fills up
> the disk rather quickly. Any good strategies for dealing with the WAL
> segments that get put in there. Do I really need them after postgresql
> has copied them up into the pg_xlog directory? If so, how far back
> should I keep them? Yes, I know about keeping everything between
> backups. So, if my directory looks like:
>
> 00000000300000000C000000A1
> 00000000300000000C000000A2
> 00000000300000000C000000A3
> 00000000300000000C000000A3.backup
> 00000000300000000C000000A4
>
> Could I safely delete the *A1, *A2, and maybe even the *A3 files?
Take a look at the pg_archivecleanup tool.
You might also want to look at PgBarman to automate this.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-07-14 02:20:00 | Re: postgresql checking return status of archive_command? |
Previous Message | Craig Ringer | 2014-07-14 02:07:55 | Re: wal archive showing zero size |