Re: HOT for PostgreSQL 8.3

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: HOT for PostgreSQL 8.3
Дата
Msg-id 2e78013d0702111954p6e6054f2s8ab11701c0de0ac@mail.gmail.com
обсуждение исходный текст
Ответ на Re: HOT for PostgreSQL 8.3  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: HOT for PostgreSQL 8.3
Список pgsql-hackers

On 2/12/07, Heikki Linnakangas <heikki@enterprisedb.com> wrote:
Hannu Krosing wrote:
> Ühel kenal päeval, P, 2007-02-11 kell 12:35, kirjutas Tom Lane:
>> Hannu Krosing <hannu@skype.net> writes:
>>> What if we would just reuse the root tuple directly instead of turning
>>> it into a stub ?
>>> This would create a cycle of ctid pointers, which changes the lookup
>>> process from 'follow ctid chaint until the end' to 'follow the tid chain
>>> until you reach the start'.
>> How do you know which one is newest?
>
> By xmin,cmin of course .
>
>> What happens when you have to put a newer version off-page for lack of space?
>
> Then this scheme won't work.

Couldn't the ctid of the latest tuple point to the off-page tuple as usual?

It could. But then you may lose reference for older version(s). We can do
the whole page scans to locate older versions, but that might prove too
costly
 

It might be acceptable, if it was only stored on those tuples that are
(HOT) updated. But it's not clear to me what you're proposing to do with
the field, anyway, Which tuples would have it, and what would it point to?

My guess what Hannu is suggesting is to have a  circular chain of HOT-updated
tuples in a page. The index can point to any tuple in the chain. When
update goes off-page or is a COLD update, t_ctid points to the newer version
as usual. So a tuple which is COLD updated would need two pointers, one
which points to the oldest version in the circular on-page chain and other which
points to the new version.
 
Thanks,
Pavan

--

EnterpriseDB     http://www.enterprisedb.com

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Documentation on WAL/buffer cache/checkpoint internals
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: select from sequences