Re: Checkpoint question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Checkpoint question
Date
Msg-id 3094.1137057337@sss.pgh.pa.us
Whole thread Raw
In response to Re: Checkpoint question  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
>> On Wed, 11 Jan 2006, Tom Lane wrote:
>>> It'd be possible to do something like this: after establishing
>>> RedoRecPtr, make one quick pass through the buffers and make a list of
>>> what needs to be dumped at that instant.  Then go back and do the actual
>>> I/O for only those buffers.

> To compile the list, you'd need to stop all buffer write activity while
> you compile it, which sounds a high price for the benefit.

Not really --- I was only thinking of narrowing the window for "extra"
writes to get in, not removing the window entirely.  Don't need any sort
of global lock for that.

But I agree with your analysis that the extra cycles won't save much in
practice.  The objection I see is that two lock cycles on each targeted
buffer are a nontrivial expense in SMP machines.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Checkpoint question
Next
From: Qingqing Zhou
Date:
Subject: Re: Checkpoint question