Wrong docs on checkpoint_segments?

От: Florian Weimer
Тема: Wrong docs on checkpoint_segments?
Дата: ,
Msg-id: 82aajcg9wa.fsf@mid.bfk.de
(см: обсуждение, исходный текст)
Ответы: Re: Wrong docs on checkpoint_segments?  (Andres Freund)
Список: pgsql-performance

Скрыть дерево обсуждения

Wrong docs on checkpoint_segments?  (Florian Weimer, )
 Re: Wrong docs on checkpoint_segments?  (Andres Freund, )
  Re: Wrong docs on checkpoint_segments?  (Florian Weimer, )
   Re: Wrong docs on checkpoint_segments?  (Andres Freund, )

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.

The documentation says this:

    Maximum number of log file segments between automatic WAL
    checkpoints (each segment is normally 16 megabytes). The default
    is three segments. Increasing this parameter can increase the
    amount of time needed for crash recovery. This parameter can only
    be set in the postgresql.conf file or on the server command line.

It would probably make sense to change this to

checkpoint_segments = 3     # each one effectively needs about 32MB on disk

and:

    Number of log file segments between automatic WAL checkpoints. The
    default is three segments. Increasing this parameter can increase
    the amount of time needed for crash recovery. This parameter can
    only be set in the postgresql.conf file or on the server command
    line.

    Each segment normally requires 16 megabytes on disk.  Segments can
    only be recycled after a checkpoint has completed, so disk space
    is required for twice the number of configured segments, plus some
    reserve.

Perhaps it would also make sense to mention that increasing the
segment count decreases WAL traffic, and that changing this value does
not have an impact on transaction sizes?

--
Florian Weimer                <>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


В списке pgsql-performance по дате сообщения:

От: Samuel Gendler
Дата:
Сообщение: Re: Wrong docs on wal_buffers?
От: Greg Smith
Дата:
Сообщение: Re: Wrong docs on wal_buffers?