Re: Block-level CRC checks

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Block-level CRC checks
Дата
Msg-id 20081118172324.GI4141@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Block-level CRC checks  (Aidan Van Dyk <aidan@highrise.ca>)
Ответы Re: Block-level CRC checks  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: Block-level CRC checks  (Aidan Van Dyk <aidan@highrise.ca>)
Список pgsql-hackers
Aidan Van Dyk wrote:

> And I don't think anyone's going to have a good answer either way unless we get
> real numbers.  But I don't know of any way to get at these numbers right now.
> 
> 1) How many writes happen on buffer pages that are "hint dirty" but not "really
>    dirty"?
> 
> 2) How much IO would writing the WAL records "hint bits" on every page write
>    take up?

I don't think it's a matter of hoy many writes or how much IO.  The
question is locks.  Right now we flip hint bits without taking any kind
of lock on the page.  If we're going to WAL-log each hint bit change,
then we will need to lock the page to update the LSN.  This will make
changing a hint bit a very expensive operation, and maybe a possible
cause for deadlocks.

What my patch did was log hint bits in bulk.  The problem of that
approach was precisely that it was not locking the logged page enough
(locking before setting the "this page needs hint bits logged" bit).  Of
course, the trivial solution is just to lock the page before flipping
hint bits, but I don't know (and I doubt) whether it would really work
at all.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1197)
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Block-level CRC checks