Fwd: Clarification about HOT

From: "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com>
To: "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Fwd: Clarification about HOT
Date: 2007-11-05 09:48:00
Message-ID: 9362e74e0711050148t12038b5eq4c564063b0d4091d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Forgot to include the group...

---------- Forwarded message ----------
From: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
Date: Nov 5, 2007 3:04 PM
Subject: Re: Clarification about HOT
To: Gregory Stark <stark(at)enterprisedb(dot)com>

On 11/2/07, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
>
>
> "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com> writes:
>
> >> Another reason is that it avoids the whole problem of updating multiple
> >> pages atomically, without deadlocks.
> >
> >
> > Thanks Heikki. I am still not getting what you said. In the case of
> HOT,
> > you need to update the top pointer to point to some other tuple in some
> > other page. That's one update. what's the other one?
>
> There are several problems, two that come to mind are:
>
> 1) How do you make the dead top pointer redirect to the first live pointer
> in
> the chain? Currently we store the item number of the first live tuple in
> the
> line pointer. You would have to keep the tuple around, though you could
> truncate it to just the tuple header.
>
> 2) When vacuuming how do you find the head of the chain when you're
> looking at
> a dead tuple? There's no space in the tuple header to store the head of
> the
> chain. Besides you want to vacuum scanning sequentially, not randomly.

Thanks for all the inputs. My question would be if we decide to update the
top of the HOT chain in the Index itself. Right now we are carrying a list
of tuple-ids to be vacuumed, when we vacuum the index. Say we carry another
list (or through some better mechanism), which would carry the corresponding
live HOT tuple to be pointed. In other words we would try to make the index
point to the top of the HOT chain during Vacuum.

Am i making some mistake?

--
Thanks,
Gokul.
CertoSQL Project,
Allied Solution Group.
(www.alliedgroups.com)

--
Thanks,
Gokul.
CertoSQL Project,
Allied Solution Group.
(www.alliedgroups.com)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-05 09:52:54 Visibility map thoughts
Previous Message Simon Riggs 2007-11-05 06:51:31 Re: Proposal: Select ... AS OF Savepoint