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

Re: What process clears the logs?

From: Carol Walter <walterc(at)indiana(dot)edu>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: What process clears the logs?
Date: 2008-09-30 21:33:44
Message-ID: ED139E0C-2CA8-4761-81D5-CFE6FD1A7E7F@indiana.edu (view raw or flat)
Thread:
Lists: pgsql-admin
Ah-h-h, that's exactly my question.  What part of Postgres "takes  
care of this itself."  I'm asking because I had 86 pg_clog files  
dated back to mid-May.  I got the impression from something Tom said  
that backups should prune this directory.  Perhaps my "impression"  
was wrong.  Most databases I've used in the past have gotten rid of  
the transaction logs, etc, when a backup is done. The restore process  
used that last backup and then applied the transaction logs to it.   
Once another backup was completed the old transaction logs were no  
longer needed.  I'm trying to understand what happens "under the  
hood" so to speak.  What checkpoint_settings value are you referring to?

Thanks,
Carol

On Sep 30, 2008, at 3:26 PM, Steve Crawford wrote:

> Carol Walter wrote:
>> Greetings,
>>
>> As you may be aware, we experienced a problem last week with  
>> pg_clogs that had been deleted, through human error it appears.   
>> What process will clear or delete the pg_clogs?  I've been all  
>> over the documentation and I'm not finding a reference to this.
>>
> PostgreSQL takes care of this itself. I don't know where it is  
> documented but IIRC from old messages, the number of files in  
> pg_xlog should level out at about two-times your  
> checkpoint_settings value.
>
> I'd have to do some digging as I don't recall for sure, but I think  
> that if you are using archive_command setting to archive WAL files   
> the archive command does not return "success", then the WAL file  
> will not be removed/reused.
>
> Cheers,
> Steve
>


In response to

Responses

pgsql-admin by date

Next:From: Steve CrawfordDate: 2008-09-30 21:58:36
Subject: Re: What process clears the logs?
Previous:From: Steve CrawfordDate: 2008-09-30 19:26:42
Subject: Re: What process clears the logs?

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