From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: visibility maps |
Date: | 2008-12-06 17:04:59 |
Message-ID: | 493AB0BB.3080401@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavan Deolasee wrote:
> On Sat, Dec 6, 2008 at 7:57 PM, Heikki Linnakangas <
> heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>
>> Umm, what non-atomic state could the bit be in? Half-set, half-cleared? Or
>> do you think that if some other bit in proximity is changed, the other bit
>> would temporarily flip 0->1->0, or something like that? I don't think that
>> should happen.
>>
> Since the lock is not held, the bit can be flipped while we are reading,
> isn't it ? IOW, the test is not reliable is what I fear.
If someone is changing the bit at the same time, it doesn't matter
whether we read it as 1 or 0. Locking the page wouldn't change the
situation: you would still read the old value if you got the lock before
the concurrent updater, or the new value if you got the lock after.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2008-12-06 17:32:05 | Re: visibility maps |
Previous Message | Pavan Deolasee | 2008-12-06 14:46:22 | Re: visibility maps |