Re: control the number of clog files and xlog files

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Duan Ligong <duanlg(at)nec-as(dot)nec(dot)com(dot)cn>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: control the number of clog files and xlog files
Date: 2008-08-27 13:08:00
Message-ID: 20080827130800.GB4071@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-performance

Duan Ligong wrote:
> Alvaro, Thanks for your answer.
> It would be very helpful.
>
> > > Would you like to be so kind as to answer the following questions:
> > >
> > > - Is there any way to control the number of clog files and xlog files?
> > > I encounter an issue that there are too many clog files under the
> > > pg_clog/ directory which occupy more space than I can endure..
> >
> > pg_clog files are controlled by tuple freezing, which is done by vacuum,
> > and it depends on the autovacuum_min_freeze_age parameter and
> > vacuum_freeze_min_age. Please read
>
> So can we reduce the number of clog by increasing the
> autovacuum_min_freeze_age parameter and vacuum_freeze_min_age
> ?

Yes, but decreasing the value.

Sorry, you ask more questions that I have time to answer right now.

> I encoutered a scenario that there are many files and some of them
> are as old as one month ago. Does all these files including the
> old files are still useful for postgresql? and when will they deleted
> or rotated? Or should they be deleted and maintained by external
> programs?

Yes, those files are still useful. They will be deleted eventually.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message DANIEL CRISTIAN CRUZ 2008-08-27 13:24:51 Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
Previous Message Bill Moran 2008-08-27 13:01:23 Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception