Re: Incorrect visibility test function assigned to snapshot

From: Antonin Houska <ah(at)cybertec(dot)at>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incorrect visibility test function assigned to snapshot
Date: 2019-02-08 10:59:05
Message-ID: 23440.1549623545@localhost
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)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

Attachment Content-Type Size
snapshot_type.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-02-08 11:01:43 Re: Inconsistent error handling in the openssl init code
Previous Message Matsumura, Ryo 2019-02-08 10:37:09 RE: [PROPOSAL]a new data type 'bytea' for ECPG