Re: Clarification about HOT

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Clarification about HOT
Дата
Msg-id 20071102133816.GC9936@svana.org
обсуждение исходный текст
Ответ на Clarification about HOT  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Ответы Re: Clarification about HOT  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Список pgsql-hackers
On Fri, Nov 02, 2007 at 06:12:37PM +0530, Gokulakannan Somasundaram wrote:
> I am especially interested in the case of continuing the HOT chain across
> pages. When we are actually reclaiming space, we should check the snapshot
> and reclaim it. If it is HOT updated, we will leave the top most tuple and
> take the rest. So then the top most tuple will remain always and any index
> scan now has to make read two heap pages to reach the target entry.Is this
> the only reason, it was left out?

It's not that simple. At any point in time there may be dozens of
active snapshots, each of which might see a different tuple in the
chain. So to clear any tuple you have to wait until all active
snapshots are gone. You will almost never be able to reduce the chain
to just one.

As for your original question and jumping across pages, why stop at
one. Why not chain HOT tuples down 100 pages? Because then it gets very
expensive. Not to mention the locking considerations. Better keep it
simple.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

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

Предыдущее
От: Jeff Trout
Дата:
Сообщение: Intel x64 vs AMD x64 pgdata
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Intel x64 vs AMD x64 pgdata