pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWhat process clears the logs?
5+ messages / 3 participants
[nested] [flat]
* What process clears the logs?
@ 2008-09-30 16:31 Carol Walter <walterc@indiana.edu>
2008-09-30 19:26 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 1 reply; 5+ messages in thread
From: Carol Walter @ 2008-09-30 16:31 UTC (permalink / raw)
To: pgsql-admin
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.
Thanks, in advance,
Carol
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: What process clears the logs?
2008-09-30 16:31 What process clears the logs? Carol Walter <walterc@indiana.edu>
@ 2008-09-30 19:26 ` Steve Crawford <scrawford@pinpointresearch.com>
2008-09-30 21:33 ` Re: What process clears the logs? Carol Walter <walterc@indiana.edu>
0 siblings, 1 reply; 5+ messages in thread
From: Steve Crawford @ 2008-09-30 19:26 UTC (permalink / raw)
To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: What process clears the logs?
2008-09-30 16:31 What process clears the logs? Carol Walter <walterc@indiana.edu>
2008-09-30 19:26 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
@ 2008-09-30 21:33 ` Carol Walter <walterc@indiana.edu>
2008-09-30 21:58 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 1 reply; 5+ messages in thread
From: Carol Walter @ 2008-09-30 21:33 UTC (permalink / raw)
To: Steve Crawford <scrawford@pinpointresearch.com>; +Cc: 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
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: What process clears the logs?
2008-09-30 16:31 What process clears the logs? Carol Walter <walterc@indiana.edu>
2008-09-30 19:26 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
2008-09-30 21:33 ` Re: What process clears the logs? Carol Walter <walterc@indiana.edu>
@ 2008-09-30 21:58 ` Steve Crawford <scrawford@pinpointresearch.com>
2008-10-01 01:15 ` Re: What process clears the logs? Rafael Domiciano <rafael.domiciano@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Steve Crawford @ 2008-09-30 21:58 UTC (permalink / raw)
To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin
Carol Walter wrote:
> 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?
Sorry. I had a brain/fingers disconnect. I meant the
"checkpoint_segments" setting. Anyway, answers to a number of your
questions regarding write-ahead logging may be found here:
http://www.postgresql.org/docs/8.3/interactive/wal-configuration.html
Cheers,
Steve
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: What process clears the logs?
2008-09-30 16:31 What process clears the logs? Carol Walter <walterc@indiana.edu>
2008-09-30 19:26 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
2008-09-30 21:33 ` Re: What process clears the logs? Carol Walter <walterc@indiana.edu>
2008-09-30 21:58 ` Re: What process clears the logs? Steve Crawford <scrawford@pinpointresearch.com>
@ 2008-10-01 01:15 ` Rafael Domiciano <rafael.domiciano@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Rafael Domiciano @ 2008-10-01 01:15 UTC (permalink / raw)
To: Steve Crawford <scrawford@pinpointresearch.com>; +Cc: Carol Walter <walterc@indiana.edu>; pgsql-admin
Hello Carol,
Maybe I'm thinking wrong, but I have a problem like yours; and I realize
that the vacuum Freeze that does that work.
I have read that somewhere in the net, that I don't remember now.
To prevent that I created a proccess that run every night, that vacuums the
database, and started the vacuum daemon.
All machines I had problems are Slony-slaves.
Best Regards,
Rafael Domiciano
Postgres DBA
2008/9/30 Steve Crawford <scrawford@pinpointresearch.com>
> Carol Walter wrote:
>
>> 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?
>>
> Sorry. I had a brain/fingers disconnect. I meant the "checkpoint_segments"
> setting. Anyway, answers to a number of your questions regarding write-ahead
> logging may be found here:
> http://www.postgresql.org/docs/8.3/interactive/wal-configuration.html
>
>
> Cheers,
> Steve
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2008-10-01 01:15 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-09-30 16:31 What process clears the logs? Carol Walter <walterc@indiana.edu>
2008-09-30 19:26 ` Steve Crawford <scrawford@pinpointresearch.com>
2008-09-30 21:33 ` Carol Walter <walterc@indiana.edu>
2008-09-30 21:58 ` Steve Crawford <scrawford@pinpointresearch.com>
2008-10-01 01:15 ` Rafael Domiciano <rafael.domiciano@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox