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

From Tom Lane
Subject Re: Pruning never visible changes
Date
Msg-id 3677239.1663338389@sss.pgh.pa.us
Whole thread Raw
In response to Pruning never visible changes  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Pruning never visible changes
Re: Pruning never visible changes
Re: Pruning never visible changes
List pgsql-hackers
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?  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 not sure whether or not snapmgr.c has enough information to
determine that, but in any case this formulation is surely
unsafe, because it isn't even checking whether that transaction is
our own, let alone asking snapmgr.c.

I'm dubious that a safe version would fire often enough to be
worth the cycles spent.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Maxim Orlov
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15
Next
From: Peter Eisentraut
Date:
Subject: Re: [PoC] Let libpq reject unexpected authentication requests