Re: Do we need so many hint bits? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Do we need so many hint bits?
Date
Msg-id 1353258799.10198.84.camel@jdavis-laptop
Whole thread Raw
In response to Re: Do we need so many hint bits?  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Do we need so many hint bits?  (Atri Sharma <atri.jiit@gmail.com>)
List pgsql-hackers
On Sun, 2012-11-18 at 15:19 +0100, Andres Freund wrote:
> On Sunday, November 18, 2012 03:07:01 AM Jeff Davis wrote:
> > Process A (process that clears a VM bit for a data page):
> >   1. Acquires exclusive lock on data buffer
> >   2. Acquires exclusive lock on VM buffer
> >   3. clears VM bit
> >   4. Releases VM buffer lock
> >   5. Releases data buffer lock
> 
> Well, but right this is a rather big difference. If vm pages get 
> unconditionally locked all the time we will have a huge source of new 
> contention as they are shared between so many heap pages.

No, that is only for the process *clearing* the bit, and this already
happens. I am not planning on introducing any new locks, aside from the
buffer header lock when acquiring a pin. And I plan to keep those pins
for long enough that those don't matter, either.

Regards,Jeff Davis




pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]