Home > Archive > PostgreSQL Administration > July 2005 > Checkpoint segments









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Checkpoint segments
Simon Riggs

2005-07-26, 8:24 pm


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?

pg 7.4.6

Best Regards, Simon Riggs


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Simon Riggs

2005-07-29, 7:24 am

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


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com