Re: min/max_wal_size - Mailing list pgsql-general

From Albe Laurenz
Subject Re: min/max_wal_size
Date
Msg-id A737B7A37273E048B164557ADEF4A58B5399B162@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to min/max_wal_size  (Torsten Förtsch <tfoertsch123@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Torsten Förtsch
Date:
Subject: Re: min/max_wal_size
Next
From: "Charles Clavadetscher"
Date:
Subject: Re: max_connections limit violation not showing in pg_stat_activity