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 A37A0537A3 for ; Tue, 5 Apr 2005 05:08:07 +0100 (BST) 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 94670-09 for ; Tue, 5 Apr 2005 04:07:59 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by svr1.postgresql.org (Postfix) with ESMTP id 97CE05379C for ; Tue, 5 Apr 2005 05:07:58 +0100 (BST) Received: from spectre (c-66-30-216-118.hsd1.ma.comcast.net[66.30.216.118]) by comcast.net (rwcrmhc13) with SMTP id <20050405040754015001eqpne>; Tue, 5 Apr 2005 04:07:54 +0000 From: "Ian Westmacott" To: Subject: VACUUM and read-mostly tables Date: Mon, 4 Apr 2005 23:58:13 -0400 Message-ID: <000201c53993$b07bb440$76d81e42@hsd1.ma.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.818 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/56 X-Sequence-Number: 17069 I have a near-real-time system writing into a Postgres 7.4.2 database on the order of 340 million rows per day in about 300 million transactions. So we quickly bump up against the XID wrap-around issue. To address this, we divide the tables into 24-hour periods. Once we roll over to a new period, the old tables are read-mostly. We then run vacuum every 24 hours. The problem is that we are writing rows every 1/15 second, 24x7. There is no down time. I'm wondering if there is any way to avoid vacuuming the old tables over and over. The documentation seems to indicate that a full vacuum is needed to avoid XID wrap-around. Can vacuum freeze help me? Thanks, --Ian