Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Block-level CRC checks
Дата
Msg-id 21582.1227029846@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Alvaro Herrera wrote:
>> Right now we flip hint bits without taking any kind
>> of lock on the page.

> That's not quite true. You need to hold a shared lock on heap page to 
> examine the visibility of a tuple, and that's when the hint bits are 
> set. So we always hold at least a shared lock on the page while hint 
> bits are set.

Right, but we couldn't let hint-bit-setters update the page LSN with
only shared lock.  Too much chance of ending up with a scrambled LSN
value.

Could we arrange for the actual LSN-updating to be done while still
holding WALInsertLock?  Then we'd be depending on that lock, not the
page-level locks, to serialize.  It's not great to be pushing more work
inside that global lock, but it's not very much more work ...
        regards, tom lane


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

Предыдущее
От: Aidan Van Dyk
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Simple postgresql.conf wizard