Re: Wrong docs on checkpoint_segments?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Florian Weimer <fweimer(at)bfk(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Wrong docs on checkpoint_segments?
Date: 2011-01-07 13:47:24
Message-ID: 201101071447.24345.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Friday, January 07, 2011 02:45:02 PM Florian Weimer wrote:
> * Andres Freund:
> > On Friday, January 07, 2011 01:45:25 PM Florian Weimer wrote:
> >> On 9.0, this configuration
> >>
> >> checkpoint_segments = 512 # in logfile segments, min 1, 16MB each
> >>
> >> results in 1034 segments, so the effective logfile segment size is 32
> >> MB.
> >
> > Um. Is it possible that you redefined XLOG_SEG_SIZE or used --with-wal-
> > segsize=SEGSIZE?
>
> No, the individual files are still 16 MB. It's just that the
> checkpoint_segments limit is not a hard limit, and you end up with
> slightly more than twice the configured number of segments on disk.
Thats documented:
"
There will always be at least one WAL segment file, and will normally not be
more files than the higher of wal_keep_segments or (2 +
checkpoint_completion_target) * checkpoint_segments + 1. Each segment file is
normally 16 MB (though this size can be altered when building the server). You
can use this to estimate space requirements for WAL. Ordinarily, when old log
segment files are no longer needed, they are recycled (renamed to become the
next segments in the numbered sequence). If, due to a short-term peak of log
output rate, there are more than 3 * checkpoint_segments + 1 segment files, the
unneeded segment files will be deleted instead of recycled until the system
gets back under this limit.
"

Andres

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message pasman pasmański 2011-01-07 14:00:22 Re: plan question - query with order by and limit not choosing index depends on size of limit, table
Previous Message Florian Weimer 2011-01-07 13:45:02 Re: Wrong docs on checkpoint_segments?