Re: When do archived WAL files gets removed after wal_keep_segments changed?

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Christian Hammers <ch(at)lathspell(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: When do archived WAL files gets removed after wal_keep_segments changed?
Date: 2012-11-02 15:27:39
Message-ID: CAHGQGwEDef+Z49HeBcE9FwtsXPB3sm5xr8o9OCXwHof-f8bSTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 1, 2012 at 1:21 AM, Christian Hammers <ch(at)lathspell(dot)de> wrote:
> 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.

wal_keep_segments affects the WAL files in pg_xlog directory,
not archive directory. When and how to remove archived files is
basically responsibility of a user.

Regards,

--
Fujii Masao

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2012-11-02 21:51:13 Re: Where is 'createdb'?
Previous Message Shaun Thomas 2012-11-02 14:14:44 Re: Unexplained Major Vacuum Archive Activity During Vacuum