pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Checkpoint segments
4+ messages / 3 participants
[nested] [flat]

* Checkpoint segments
@ 2005-07-26 22:22  Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Simon Riggs @ 2005-07-26 22:22 UTC (permalink / raw)
  To: pgsql-admin


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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Checkpoint segments
@ 2005-07-29 11:53  Simon Riggs <simon@2ndquadrant.com>
  parent: Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Simon Riggs @ 2005-07-29 11:53 UTC (permalink / raw)
  To: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* checkpoint_segments
@ 2006-03-03 16:31  Mr. Dan <bitsandbytes88@hotmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Mr. Dan @ 2006-03-03 16:31 UTC (permalink / raw)
  To: pgsql-admin

postgresql 8.1.0

Hi,

I have checkpoint_segments set to 18, yet I have 38 segmnet files in 
pg_xlog.  Is there a reason for that?

Thanks in advance,
~DjK

# WRITE AHEAD LOG
#---------------------------------------------------------------------------

# - Settings -

#fsync = on                       # turns forced synchronization on or off
#wal_sync_method = fsync  # the default is the first option
                                        # supported by the operating system:
                                        #   open_datasync
                                        #   fdatasync
                                        #   fsync
                                        #   fsync_writethrough
                                        #   open_sync
#full_page_writes = on                  # recover from partial page writes
#wal_buffers = 8                        # min 4, 8KB each
wal_buffers = 16                        # min 4, 8KB each
#commit_delay = 0                       # range 0-100000, in microseconds
#commit_siblings = 5                    # range 1-1000

# - Checkpoints -

#checkpoint_segments = 3                # in logfile segments, min 1, 16MB 
each
checkpoint_segments = 18                # in logfile segments, min 1, 16MB 
each
#checkpoint_timeout = 300               # range 30-3600, in seconds
#checkpoint_warning = 30                # in seconds, 0 is off





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: checkpoint_segments
@ 2006-03-03 17:17  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Mr. Dan <bitsandbytes88@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2006-03-03 17:17 UTC (permalink / raw)
  To: Mr. Dan <bitsandbytes88@hotmail.com>; +Cc: pgsql-admin

"Mr. Dan" <bitsandbytes88@hotmail.com> writes:
> I have checkpoint_segments set to 18, yet I have 38 segmnet files in 
> pg_xlog.  Is there a reason for that?

The normal steady state is about 2N segment files, because we keep the
last two checkpoints' worth of WAL data.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-03-03 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 22:22 Checkpoint segments Simon Riggs <simon@2ndquadrant.com>
2005-07-29 11:53 ` Simon Riggs <simon@2ndquadrant.com>
2006-03-03 16:31 checkpoint_segments Mr. Dan <bitsandbytes88@hotmail.com>
2006-03-03 17:17 ` Re: checkpoint_segments Tom Lane <tgl@sss.pgh.pa.us>

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