Re: Clarification about HOT

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification about HOT
Date: 2007-11-02 17:20:41
Message-ID: 87640k36om.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"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.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message bruno.gaudin 2007-11-02 17:24:18 Re: beta2, I can't set UTF-8 for czech locales on win
Previous Message Andrew Dunstan 2007-11-02 17:14:02 Re: minimal update