Re: Pruning never visible changes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Pruning never visible changes
Date
Msg-id 3843084.1663349854@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pruning never visible changes  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Pruning never visible changes
List pgsql-hackers
Simon Riggs <simon.riggs@enterprisedb.com> writes:
> On Fri, 16 Sept 2022 at 15:26, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> You cannot
>> do that, at least not without checking that the originating
>> transaction has no snapshots that could see the older row version.

> I'm saying this is possible only AFTER the end of the originating
> xact, so there are no issues with additional snapshots.

I see, so the point is just that we can prune even if the originating
xact hasn't yet passed the global xmin horizon.  I agree that's safe,
but will it fire often enough to be worth the trouble?  Also, why
does it need to be restricted to certain shapes of HOT chains ---
that is, why can't we do exactly what we'd do if the xact *were*
past the xmin horizon?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Pruning never visible changes
Next
From: Sergei Kornilov
Date:
Subject: Re:pg_stat_statements and "IN" conditions