Re: pg_clog questions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Subject: Re: pg_clog questions
Date: 2006-05-25 20:20:44
Message-ID: 15596.1148588444@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Benjamin Krajmalnik" <kraj(at)illumen(dot)com> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2006-05-25 20:43:19 Re: pg_clog questions
Previous Message Benjamin Krajmalnik 2006-05-25 20:12:41 Re: Strange errors in log file