Re: Buffer access rules, and a probable bug - Mailing list pgsql-hackers

From Bill Studenmund
Subject Re: Buffer access rules, and a probable bug
Date
Msg-id Pine.NEB.4.21.0107101318360.426-100000@candlekeep.home-net.internetconnect.net
Whole thread Raw
In response to Re: Buffer access rules, and a probable bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Buffer access rules, and a probable bug
List pgsql-hackers
Sorry for the delay.

On Tue, 3 Jul 2001, Tom Lane wrote:

> ncm@zembu.com (Nathan Myers) writes:
> 
> > Also, as hints, would it be Bad(tm) if an attempt to clear one failed?
> 
> Clearing hint bits is also an exclusive-lock-only operation.  Notice
> I specified that *setting* them is the only case allowed to be done
> with shared lock.

One problem though is that if you don't have a spin lock around the flag,
you can end up clearing it inadvertenty. i.e. two backends go to update
(different) bit flags. They each load the current value, and each set the
(different) bit they want to set. They then store the new value they each
have come up with. The second store will effectively clear the bit set in
the first store.

??

Take care,

Bill



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: grant and SQL92
Next
From: Vince Vielhaber
Date:
Subject: Re: grant and SQL92