Simon Riggs <simon.ri...@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