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 DC88F9FA278 for ; Thu, 25 May 2006 19:46:51 -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 44878-05 for ; Thu, 25 May 2006 19:46:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 765199FA682 for ; Thu, 25 May 2006 19:46:48 -0300 (ADT) Received: from stash.illumen.com (unknown [64.207.29.137]) by svr4.postgresql.org (Postfix) with ESMTP id AD0C95B0CE7 for ; Thu, 25 May 2006 22:26:48 +0000 (GMT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: pg_clog questions X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 25 May 2006 16:25:03 -0600 Message-ID: <8511B4970E0D124898E973DF496F9B432516EA@stash.stackdump.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] pg_clog questions thread-index: AcaAOLXIRFYMvK3EQ9eSB+p6dSae1QAEOmSw From: "Benjamin Krajmalnik" To: "Tom Lane" Cc: , "Alvaro Herrera" , "Matthew T. O'Connor" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/371 X-Sequence-Number: 21903 I just ran both VACUUM ANALYZE and VACUUM on all of the databases (the project database and the database created for the default user). All of the commit logs are still there. Do they get cleared only by VACUUM FULL? It is my understanding from the docs that vacuum full places exclusive locks, correct? In that case, I canot run it because the database is getting pounded 24x7 with row insertions. On another subject, is there a query I can run to find out who the owner of a filenode is? -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: Thursday, May 25, 2006 2:21 PM To: Benjamin Krajmalnik Cc: pgsql-admin@postgresql.org; Alvaro Herrera; Matthew T. O'Connor Subject: Re: [ADMIN] pg_clog questions=20 "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