Re: min/max_wal_size

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: 'Torsten Förtsch *EXTERN*' <tfoertsch123(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: min/max_wal_size
Date: 2016-11-23 10:04:58
Message-ID: A737B7A37273E048B164557ADEF4A58B5399B162@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Torsten Förtsch wrote:
> Now, I have a database with very low write activity. Archive_command is called about once per hour to
> archive one segment. When the database was moved to PG 9.5, it was initially configured with insanely
> high settings for max_wal_size, min_wal_size and wal_keep_segments. I reset min/max_wal_size to the
> default settings of 80MB and 1GB and reduced wal_keep_segments to 150.
>
> Why does a database that generates a little more than 1 WAL file per hour and has a checkpoint_timeout
> of 30 minutes with a completion_target=0.7 need so many of them? The default value for min_wal_size is
> 80MB which amounts to 5 segments. That should be totally enough for this database.
>
> Is this because of the previously insanely high setting (min=1GB, max=9GB)? Should I expect this value
> to drop in a week's time? Or is there anything that I am not aware of?

The size of pg_xlog will shrink slowly if there is little activity on the database.
Whenever a WAL segment has been archived, it will be deleted rather than recycled
as long as WAL size exceeds max_wal_size.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2016-11-23 10:43:31 Re: max_connections limit violation not showing in pg_stat_activity
Previous Message Torsten Förtsch 2016-11-23 08:44:41 Re: min/max_wal_size