Re: visibility maps

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: visibility maps
Дата
Msg-id 493AB0BB.3080401@enterprisedb.com
обсуждение исходный текст
Ответ на Re: visibility maps  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-hackers
Pavan Deolasee wrote:
> On Sat, Dec 6, 2008 at 7:57 PM, Heikki Linnakangas <
> heikki.linnakangas@enterprisedb.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: visibility maps
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: visibility maps