Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 00DFD1337B99 for ; Fri, 7 Jan 2011 08:45:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 21815-04 for ; Fri, 7 Jan 2011 12:45:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by mail.postgresql.org (Postfix) with ESMTP id 22ACE13364DE for ; Fri, 7 Jan 2011 08:45:26 -0400 (AST) Received: from mx00.int.bfk.de ([10.119.110.2]) by mx01.bfk.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) id 1PbBh7-0006sc-Pj for pgsql-performance@postgresql.org; Fri, 07 Jan 2011 12:45:25 +0000 Received: by bfk.de with local id 1PbBh7-0001VC-MX for pgsql-performance@postgresql.org; Fri, 07 Jan 2011 12:45:25 +0000 To: pgsql-performance@postgresql.org Subject: Wrong docs on checkpoint_segments? From: Florian Weimer Date: Fri, 07 Jan 2011 12:45:25 +0000 Message-ID: <82aajcg9wa.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/41 X-Sequence-Number: 41828 On 9.0, this configuration checkpoint_segments =3D 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 =3D 3 # each one effectively needs about 32MB on di= sk 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? --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99