Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EB78A1337BD6 for ; Fri, 15 Oct 2010 06:20:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 22857-05 for ; Fri, 15 Oct 2010 09:20:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148109.authsmtp.co.uk (outmail148109.authsmtp.co.uk [62.13.148.109]) by mail.postgresql.org (Postfix) with ESMTP id 8EF711337BD2 for ; Fri, 15 Oct 2010 06:20:04 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o9F9K3OM068093; Fri, 15 Oct 2010 10:20:03 +0100 (BST) Received: from [10.8.0.139] (host217-37-44-41.in-addr.btopenworld.com [217.37.44.41]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id o9F9Jvqm049343; Fri, 15 Oct 2010 10:19:57 +0100 (BST) Subject: Re: formula about the number of WAL files From: Simon Riggs To: Fujii Masao Cc: pgsql-docs In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 15 Oct 2010 10:19:56 +0100 Message-ID: <1287134396.1725.1300.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: 6154d5d6-d83d-11df-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQBbYlpF HGQLWlREUV17WGp/ bgIfbwRafElJQQFu TkxIXVdaExpoT0MI cBdkFFgvdwFPe3pz K0RkWnYVWkV/cRJ4 FkhJQWUFMXphaTRJ TUhYJQpJcANIfBlB agJ3XHBYLwdSbGoL MygYBAV5MzJFLTlR S0kEJ1UPXQ4XHjN0 QQ0HFzg1VUoLDxoa C1QoK1oRBy4A X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 255 X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.5 tagged_above=-5 required=5 tests=BAYES_05=-0.5 X-Spam-Level: X-Archive-Number: 201010/37 X-Sequence-Number: 6178 On Thu, 2010-10-14 at 12:00 +0900, Fujii Masao wrote: > ---------------- > 29.4. WAL Configuration > > There will always be at least one WAL segment file, and will normally not > be more than (2 + checkpoint_completion_target) * checkpoint_segments + 1 > or checkpoint_segments + wal_keep_segments + 1 files. > ---------------- > > The above formula is wrong. The correct is > > (2 + checkpoint_completion_target) * checkpoint_segments + > wal_keep_segments + 1 > > The attached patch fixes this fault. The current docs are wrong, but your re-definition doesn't match the actual code in CreateCheckPoint(). I've updated the docs to reflect how the code behaves. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training and Services