On 17.01.2012 12:16, Heikki Linnakangas wrote:
> On 04.01.2012 17:05, Peter Geoghegan wrote:
>> On 4 January 2012 07:24, Heikki Linnakangas
>> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>> I think SetBufferCommitInfoNeedsSave() needs the same treatment as
>>> MarkBufferDirty(). And it would probably be good to only set the
>>> latch if
>>> the buffer wasn't dirty already. Setting a latch that's already set
>>> is fast,
>>> but surely it's even faster to not even try.
>> That seems reasonable. Revised patch is attached.
> Thanks! It occurs to me that it's still a bad idea to call SetLatch()
> while holding the buffer header spinlock. At least when it's trivial to
> just move the call after releasing the lock. See attached.
> Could you do the sleeping/hibernating logic all in BgWriterNap()?
(sorry, forgot to update the above question before sending..)
In the patch I sent, I did rearrange the sleeping logic. I think it's
more readable the way it is now.
In response to
pgsql-hackers by date
|Next:||From: Pavel Stehule||Date: 2012-01-17 12:03:50|
|Subject: review: psql tab completion for GRANT role|
|Previous:||From: Fujii Masao||Date: 2012-01-17 10:38:23|
|Subject: Re: Online base backup from the hot-standby|