Re: HOT updates & REDIRECT line pointers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: HOT updates & REDIRECT line pointers
Date: 2012-03-22 00:41:33
Message-ID: CA+TgmobwBRZ-vEKFgf-wSTYzsQmZGcvp7TJp8wLCGwEhPuEc+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 21, 2012 at 8:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> Specifically, I'm wondering if we couldn't get away with rearranging
>>> things so that the root line pointer (which has index entries) points
>>> to the actual tuple, and the other line pointer (which can't have any
>>> index entries) gets marked UNUSED.
>
>> This would amount to changing the TID of the live row.
>
> Another issue, quite independent from race conditions against other
> observers of the row, is what if the tuple is part of an update chain?
> You have no way to find the predecessor row version and update its
> t_ctid forward link.

I don't see why I need to. The predecessor, if any, points to the
root of the HOT chain; and that's exactly the TID that I'm proposing
to keep around. The heap-only tuple's TID gets canned, but nobody can
be pointing to that from outside the block, IIUC.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-22 00:44:08 Re: HOT updates & REDIRECT line pointers
Previous Message Tom Lane 2012-03-22 00:24:24 Re: Proposal: Create index on foreign table