Re: [PATCHES] WIP archive_timeout patch - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [PATCHES] WIP archive_timeout patch
Date
Msg-id 1155888887.2591.16.camel@holly
Whole thread Raw
In response to Re: [PATCHES] WIP archive_timeout patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] WIP archive_timeout patch
List pgsql-hackers
On Thu, 2006-08-17 at 19:11 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> >> Revised patch enclosed, now believed to be production ready. This
> >> implements regular log switching using the archive_timeout GUC.
> 
> > Further patch enclosed implementing these changes plus the record type
> > version of pg_xlogfile_name_offset()
> 
> Applied with minor changes --- it seemed better to me to put tracking of
> the last xlog switch time directly into xlog.c, instead of having the
> bgwriter code try to determine whether a switch had happened recently.

Code location: sure.

> I noticed a minor annoyance while testing: when the system is completely
> idle, you get a forced segment switch every checkpoint_timeout seconds,
> even though there is nothing useful to log.  The checkpoint code is
> smart enough not to do a checkpoint if nothing has happened since the
> last one, and the xlog switch code is smart enough not to do a switch
> if nothing has happened since the last one ... but they aren't talking
> to each other and so each one's change looks like "something happened"
> to the other one.  I'm not sure how much trouble it's worth taking to
> prevent this scenario, though.  If you can't afford a WAL file switch
> every five minutes, you probably shouldn't be using archive_timeout
> anyway ...

I noticed that minor annoyance and understood that I had fixed it before
submitting. That was the reason for putting the code in bgwriter to
check whether the pointer had moved before attempting the switch...
perhaps that functionality has been removed?

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: BugTracker (Was: Re: 8.2 features status)
Next
From: "Zeugswetter Andreas DCP SD"
Date:
Subject: Re: [PATCHES] WIP archive_timeout patch