X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CDE6E3A29AB for ; Sat, 15 Jan 2005 04:08:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67305-10 for ; Sat, 15 Jan 2005 04:08:38 +0000 (GMT) Received: from sj-iport-4.cisco.com (sj-iport-4.cisco.com [171.68.10.86]) by svr1.postgresql.org (Postfix) with ESMTP id 0D65D3A299B for ; Sat, 15 Jan 2005 04:08:37 +0000 (GMT) Received: from sj-core-4.cisco.com (171.68.223.138) by sj-iport-4.cisco.com with ESMTP; 14 Jan 2005 20:09:00 -0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== Received: from cjwhitew2k02 (sjc-vpn2-198.cisco.com [10.21.112.198]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id j0F48Y1M013403; Fri, 14 Jan 2005 20:08:34 -0800 (PST) Message-Id: <200501150408.j0F48Y1M013403@sj-core-4.cisco.com> Reply-To: From: "Chris White (cjwhite)" To: "'Tom Lane'" Cc: Subject: Re: Limiting size and number of transaction logs Date: Fri, 14 Jan 2005 20:08:33 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <27796.1105752931@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Thread-Index: AcT6oon+b5QB702fQFyQRB7NkkCBdQAFUo6Q X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.474 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/161 X-Sequence-Number: 16020 Thanks for the information. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, January 14, 2005 5:36 PM To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Limiting size and number of transaction logs "Chris White (cjwhite)" writes: > In the documentation for 7.4 for WAL configuration, I see the > following > statement: > There will be at least one 16 MB segment file, and will normally not > be more than 2 * checkpoint_segments + 1 files. > So if I have 1 checkpoint segment configured, does this mean there > will be a max of 4 16MB files or 3 16MB files. Note the word "normally" --- there's no guarantees here. A spike in WAL output rate could result in more WAL segments than usual. But if you have checkpoint_segments = 1 and the system never generates more than 16MB of WAL output before the next checkpoint can complete, there'd probably be only two WAL segments. The formula says three, but what that actually means is that the checkpoint logic will allow up to three to exist without trying to get rid of any. I think that with a low enough output rate, it would flip between two segments without ever trying to make a third one. > Is there anyway of reducing this number of files, as I am running on a > system which is very tight on disk space and doesn't have that much DB > transaction throughput that needs this number of transaction logs or > is there a way of making the size smaller? In 8.0 the segment size can be configured at compile time, but I don't think I'd risk it in earlier releases. regards, tom lane