Re: Incorrect visibility test function assigned to snapshot
Antonin Houska <ah@cybertec.at>
From: Antonin Houska <ah@cybertec.at>
To: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
pgsql-hackers@postgresql.org
Date: 2019-02-08T10:59:05Z
Lists: pgsql-hackers
Attachments
- snapshot_type.patch (text/x-diff) patch
Bruce Momjian <bruce@momjian.us> wrote: > On Wed, May 30, 2018 at 09:28:54AM -0400, Alvaro Herrera wrote: > > On 2018-May-30, Antonin Houska wrote: > > > > > In the header comment, SnapBuildInitialSnapshot() claims to set > > > snapshot->satisfies to the HeapTupleSatisfiesMVCC test function, and indeed it > > > converts the "xid" array to match its semantics (i.e. the xid items eventually > > > represent running transactions as opposed to the committed ones). However the > > > test function remains HeapTupleSatisfiesHistoricMVCC as set by > > > SnapBuildBuildSnapshot(). > > > > Interesting. While this sounds like an oversight that should have > > horrible consequences, it's seems not to because the current callers > > don't seem to care about the ->satisfies function. Are you able to come > > up with some scenario in which it causes an actual problem? > > Uh, are we going to fix this anyway? Seems we should. Sorry, I forgot. Patch is below and I'm going to add an entry to the next CF. -- Antonin Houska Cybertec Schönig & Schönig GmbH Gröhrmühlgasse 26, A-2700 Wiener Neustadt Web: https://www.cybertec-postgresql.com
Commits
-
Mark correctly initial slot snapshots with MVCC type when built
- 2ad57e9e9faf 9.4.22 landed
- 03cd99a8e802 9.5.17 landed
- f131889519ad 9.6.13 landed
- a80f5c279bd5 10.8 landed
- 7ed9285c6950 11.3 landed
- 56fadbedbd2f 12.0 landed