Re: Buffer access rules, and a probable bug

From: Bill Studenmund <wrstuden(at)zembu(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Buffer access rules, and a probable bug
Date: 2001-07-10 20:21:02
Message-ID: Pine.NEB.4.21.0107101318360.426-100000@candlekeep.home-net.internetconnect.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for the delay.

On Tue, 3 Jul 2001, Tom Lane wrote:

> ncm(at)zembu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2001-07-10 20:34:16 Re: grant and SQL92
Previous Message Roderick A. Anderson 2001-07-10 20:12:05 Re: Performance tuning for linux, 1GB RAM, dual CPU?