From: Simon Riggs <simon@2ndquadrant.com>
To: pgsql-admin@postgresql.org
Subject: Re: Checkpoint segments
Date: Fri, 29 Jul 2005 12:53:41 +0100
Message-ID: <1122638022.3670.267.camel@localhost.localdomain> (raw)
In-Reply-To: <1122416554.3670.109.camel@localhost.localdomain>
References: <1122416554.3670.109.camel@localhost.localdomain>
On Tue, 2005-07-26 at 23:22 +0100, Simon Riggs wrote:
> If I have a system that writes out one WAL file every 5 minutes, and I
> have these settings:
>
> checkpoint_timeout = 3329
> checkpoint_segments = 1000
> (parameters checked as valid via pg_settings)
>
> How many WAL files would you expect to see in pg_xlog, once the system
> has reached steady state?
>
> I would expect checkpoints to occur every 3329 seconds, giving on
> average 10-11 WAL files per checkpoint. So, I expect to find up to 23
> WAL files in the pg_xlog directory.
>
> I have 308 files in pg_xlog, which remains constant. The oldest file
> time is approximately 24 hours ago.
>
> Am I just tired, or is that a little strange?
Just tired it is, of course.
Checkpoints were occurring every 3329 seconds, but the number of files
was not reducing because it is less than checkpoint_segments.
The setting of 1000 was originally chosen to be large enough so that the
checkpoint would occur only at the timeout. However, that means the only
limit placed on the size of pg_xlog was 2001 files. Since we have 308,
older files were not removed.
Best Regards, Simon Riggs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: simon@2ndquadrant.com
Subject: Re: Checkpoint segments
In-Reply-To: <1122638022.3670.267.camel@localhost.localdomain>
References: <1122416554.3670.109.camel@localhost.localdomain> <1122638022.3670.267.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox