Re: Visibility map thoughts

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Visibility map thoughts
Дата
Msg-id 473071BA.30407@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Visibility map thoughts  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Visibility map thoughts  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark wrote:
> "Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> 
>> One problem is that you have to atomically update the visibility map when
>> you update the heap. That means that you have to lock the visibility map
>> page and the heap page at the same time. If the visibility map is in the
>> heap, you need to take care that you don't deadlock.
> 
> Well that's still a problem if it's in another filenode.
> 
> On the other hand if you allocate a whole byte to every page you could set it
> atomically and not have to lock the page. Effectively having the lock on the
> original page protect the info byte. Whereas setting a single bit requires
> protecting against someone setting one of the other bits corresponding to
> another page entirely.

I don't buy that. I believe at least on some architectures you'd get a 
word-long load+modify+store, and scribble the neighboring bytes.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: "Marko Kreen"
Дата:
Сообщение: Re: Visibility map thoughts
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Visibility map thoughts