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

From Simon Riggs
Subject Re: Pruning never visible changes
Date
Msg-id CANbhV-Fm34tB4z5B2EE7Mpna_2TJ82gyD2PRaYsKPrfQGVMsSQ@mail.gmail.com
Whole thread Raw
In response to Re: Pruning never visible changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Pruning never visible changes
List pgsql-hackers
On Fri, 16 Sept 2022 at 15:26, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Simon Riggs <simon.riggs@enterprisedb.com> writes:
> > A user asked me whether we prune never visible changes, such as
> > BEGIN;
> > INSERT...
> > UPDATE.. (same row)
> > COMMIT;
>
> Didn't we just have this discussion in another thread?

Not that I was aware of, but it sounds like a different case anyway.

> 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.e. the never visible row has to be judged RECENTLY_DEAD before we even check.

-- 
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf
Next
From: Tom Lane
Date:
Subject: Re: Pruning never visible changes