Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread 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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group