X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7B3E49F9B01 for ; Thu, 25 May 2006 17:21:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 28325-05 for ; Thu, 25 May 2006 17:20:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 3F9759F94EA for ; Thu, 25 May 2006 17:20:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4PKKims015597; Thu, 25 May 2006 16:20:44 -0400 (EDT) To: "Benjamin Krajmalnik" cc: pgsql-admin@postgresql.org, Alvaro Herrera , "Matthew T. O'Connor" Subject: Re: pg_clog questions In-reply-to: <8511B4970E0D124898E973DF496F9B432516E3@stash.stackdump.local> References: <8511B4970E0D124898E973DF496F9B432516E3@stash.stackdump.local> Comments: In-reply-to "Benjamin Krajmalnik" message dated "Thu, 25 May 2006 14:03:40 -0600" Date: Thu, 25 May 2006 16:20:44 -0400 Message-ID: <15596.1148588444@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/365 X-Sequence-Number: 21897 "Benjamin Krajmalnik" writes: >>> While checking our server, I noticed quite a few files in the pg_clog >>> directory. >>> Is there a maintenance task which can be run to purge the files which >>> are no longer needed? >> VACUUM. If they're not disappearing, you aren't running an adequate >> vacuum regime --- missing out some databases, perhaps? > I have autovacuum turned on with the default settings. Hm. I believe that autovac only does database-wide vacuums when it thinks they're necessary to prevent transaction wraparound failures. Which would mean that it'd let pg_clog grow to something on the order of half a gig before any truncation would happen. That's probably insufficiently aggressive :-( Alvaro, Matthew, any thoughts about improving that? It strikes me that Alvaro's work-in-progress on maintaining per-table xmin info would allow truncation of clog without actually insisting on a database-wide VACUUM, but that's not going to be any help for existing releases. regards, tom lane