Re: Potential problem with HOT and indexes?

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Potential problem with HOT and indexes?
Date: 2009-03-08 17:12:23
Message-ID: 87ljrg7xc8.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> So it occurs to me that freezing xmin won't actually do what we want for
>> indexcheckxmin. Namely it'll make the index *never* be used.
>
> How do you figure that? FrozenXID is certainly in the past from any
> vantage point.

Uhm, I'm not sure what I was thinking.

Another thought now though. What if someone updates the pg_index entry --
since we never reset indcheckxmin then the new tuple will have a new xmin and
will suddenly become invisible again for no reason.

Couldn't this happen if you set a table WITHOUT CLUSTER for example? Or if
--as possibly happened in the user's case-- you reindex the table and don't
find any HOT update chains but the old pg_index entry had indcheckxmin set
already?

--
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 Tom Lane 2009-03-08 17:36:08 Re: Potential problem with HOT and indexes?
Previous Message Tom Lane 2009-03-08 16:45:45 Re: Potential problem with HOT and indexes?