Re: Reduced power consumption in WAL Writer process - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reduced power consumption in WAL Writer process
Date
Msg-id 5367.1310938869@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reduced power consumption in WAL Writer process  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Reduced power consumption in WAL Writer process
Re: Reduced power consumption in WAL Writer process
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Fri, Jul 15, 2011 at 6:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd say send the signal when wal buffers are more than X% full (maybe
>> half). �The suggestion to send it when wrapping around at the end of the
>> array is not quite right, because that's an arbitrary condition that's
>> not related to how much work there is for the walwriter to do. �It
>> should be cheap to check for this while advancing to a new wal buffer.

> I think we need to put the calculation and SetLatch() after we release
> WALInsertLock, so as to avoid adding contention.

Yeah, I agree with putting the actual SetLatch call after we release the
lock ... but doesn't the calculation need to be done while we're still
holding it?  Otherwise it'd be using potentially-inconsistent values.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: patch review : Add ability to constrain backend temporary file space
Next
From: Tatsuo Ishii
Date:
Subject: Re: Re: patch review : Add ability to constrain backend temporary file space