From: | Christian Hammers <ch(at)lathspell(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | When do archived WAL files gets removed after wal_keep_segments changed? |
Date: | 2012-10-31 16:21:31 |
Message-ID: | 20121031172131.51d47644@sys-251.netcologne.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
I run two PostgreSQL servers in a master-slave setup and set
wal_keep_segments=1000 on the master to allow long downtimes on the slave.
Meanwhile the disk got fuller than I estimated and I changed the config
to wal_keep_segments=500 and restarted the server afterwards.
Yet, the number of WAL segments in my archive dir was still at 1000!
I tried a random mix of VACUUM, CHECKPOINT, pg_start_backup(),
pg_stop_backup(), server restarts, googling and just plain waiting
but the number of archived WAL segments just increased to 1018.
Although I understand that I may safely delete those WAL files that
are older than the last .backup file I wonder if that shouldn't be
happen automatically. Why doesn't it?
Relevant non-default settings from the master with version 9.1.6:
wal_level = hot_standby
archive_mode = on
archive_command = 'test ! -f /srv/postgresql-archivedir/%f && cp %p /srv/postgresql-archivedir/%f'
wal_keep_segments = 500
hot_standby = on
bye,
-christian-
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2012-10-31 16:54:28 | Re: Delay streaming replication using a paramter |
Previous Message | Jeff Janes | 2012-10-31 15:50:33 | Re: Why SyncOneBuffer does not called frequently? |