Re: HOT updates & REDIRECT line pointers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HOT updates & REDIRECT line pointers
Date
Msg-id 12659.1332374988@sss.pgh.pa.us
Whole thread Raw
In response to HOT updates & REDIRECT line pointers  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: HOT updates & REDIRECT line pointers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.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.  In the past we
have considered that that can only be allowed when holding an exclusive
lock on the table (a la old-style VACUUM FULL).  An example of the sort
of situation where it'd be dangerous is an UPDATE involving a join,
which might read a tuple-to-be-updated (including its TID), then release
pin on that page for awhile while going about its business with the
join, and eventually expect to come back and find the tuple still at the
same TID.  I believe there are applications that similarly expect a TID
that they've fetched to remain valid for as long as they're holding some
type of lock on the table or row.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Proposal: Create index on foreign table
Next
From: Tom Lane
Date:
Subject: Re: HOT updates & REDIRECT line pointers