X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id ACC7E9FB392 for ; Fri, 22 Sep 2006 02:49:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 17064-04 for ; Fri, 22 Sep 2006 05:49:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 82C019FB36D for ; Fri, 22 Sep 2006 02:49:36 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by svr4.postgresql.org (Postfix) with ESMTP id 4F34F5AF98E for ; Fri, 22 Sep 2006 05:49:34 +0000 (GMT) Received: from [192.168.42.113] (natpool.bovine.net [67.100.216.14]) by webmail.enterprisedb.com (Postfix) with ESMTP id 6211DA25125; Fri, 22 Sep 2006 00:49:31 -0500 (CDT) In-Reply-To: <45126C37.6020106@gva.es> References: <45126C37.6020106@gva.es> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.com> Cc: pgsql-admin@postgresql.org, Jose Alarcon Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: WAL configuration and REINDEX Date: Thu, 21 Sep 2006 22:50:56 -0400 To: garcia_josval@gva.es X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/238 X-Sequence-Number: 23152 On Sep 21, 2006, at 6:40 AM, Jose Manuel Garci a Valladolid wrote: > I have a PostgreSQL 8.1.4 server under Linux Red Hat with several > databases. The server is configured with WAL archiving turned on. > As a maintenance process, every night one cron job launches a > backup process to the server with > pg_dump, then the server shuts down and starts up and do a REINDEX > DATABASE to all databases to keep all tables reindexed. > > After 30 days of no activity to the server (this is a DBA test > server) the amount of WAL segments is increasing at very high > speed. Every REINDEX process generates between 25 and 30 WAL > segments. With this behavior (and no activity!!) I can not maintain > this amount of data to performs future WAL backups and recovers. > > Any idea to decrease the number of WAL segments generated? > Is possible to know when a table would be reindexed and to avoid > dayly REINDEX process? I think you're running off some pretty old information. First, you should only enable WAL archiving if you intend to use PITR. pg_dump and PITR are completely un-related. In fact, if you've never taken a base filesystem backup, all those old WAL files are completely useless. Second, as long as you are vacuuming frequently enough, there's no reason you should ever have to REINDEX. You certainly shouldn't be doing it on a regular basis. -- Jim Nasby jimn@enterprisedb.com EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) -- Jim Nasby jimn@enterprisedb.com EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)