Re: HOT for PostgreSQL 8.3

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: HOT for PostgreSQL 8.3
Дата
Msg-id 45CC79AB.2030203@enterprisedb.com
обсуждение исходный текст
Ответ на Re: HOT for PostgreSQL 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: HOT for PostgreSQL 8.3  (Teodor Sigaev <teodor@sigaev.ru>)
Re: HOT for PostgreSQL 8.3  ("Simon Riggs" <simon@2ndquadrant.com>)
Re: HOT for PostgreSQL 8.3  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Tom Lane wrote:
> ISTM we could fix that by extending the index VACUUM interface to
> include two concepts: aside from "remove these TIDs when you find them",
> there could be "replace these TIDs with those TIDs when you find them".
> This would allow pointer-swinging to one of the child tuples, after
> which the old root could be removed.  

Implementing the "replace these TIDs" operation atomically would be 
simple, except for the new bitmap index am. It should be possible there 
as well, but if the old and new tid happen to be on a different bitmap 
page, it requires some care to avoid deadlocks.

Also, we'd need more work mem for vacuum.

> This has got the same atomicity
> problem as for CREATE INDEX, because it's the same thing: you're
> de-HOT-ifying the child.

Not exactly. De-HOT-ifying, or chilling, a child means inserting new 
index entries. But if we're just replacing the tids from the existing 
index entries, it's ok if we crash after replacing some but not all of 
them. The next vacuum would replace the rest of the pointers, and remove 
the old root tuple.

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


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

Предыдущее
От: Doug Knight
Дата:
Сообщение: Re: Database backup mechanism
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Archive log compression keeping physical log available in the crash recovery