Re: [DOCS] HOT - correct claim about indexes not referencing old line pointers - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [DOCS] HOT - correct claim about indexes not referencing old line pointers
Date
Msg-id CAKFQuwYyY992nPr_L=aQt4+8jcg5H9OoHGAH_bSsUni4ssum-g@mail.gmail.com
Whole thread Raw
In response to [DOCS] HOT - correct claim about indexes not referencing old line pointers  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
On Fri, Sep 29, 2023 at 10:45 AM James Coleman <jtc331@gmail.com> wrote:
Hello,

While working on my talk for PGConf.NYC next week I came across this
bullet in the docs on heap only tuples:

> Old versions of updated rows can be completely removed during normal
> operation, including SELECTs, instead of requiring periodic vacuum
> operations. (This is possible because indexes do not reference their page
> item identifiers.)

But when a HOT update happens the entry in an (logically unchanged)
index still points to the original heap tid, and that line item is
updated with a pointer to the new line pointer in the same page.

Assuming I'm understanding this correctly, attached is a patch
correcting the description.


I think we want to somehow distinguish between the old tuple that is the root of the chain and old tuples that are not.  This comment refers to pruning the chain and removing intermediate links in the chain that are no longer relevant because the root has been updated to point to the live tuple.  In README.HOT, tuple 2 in the example after 1 points to 3.


David J.

pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: [DOCS] HOT - correct claim about indexes not referencing old line pointers
Next
From: Peter Geoghegan
Date:
Subject: Re: [DOCS] HOT - correct claim about indexes not referencing old line pointers