Re: Incorrect visibility test function assigned to snapshot - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Incorrect visibility test function assigned to snapshot
Date
Msg-id B6BD7989-0298-4E05-B5AA-9B97843826BE@anarazel.de
Whole thread Raw
In response to Re: Incorrect visibility test function assigned to snapshot  (Antonin Houska <ah@cybertec.at>)
Responses Re: Incorrect visibility test function assigned to snapshot
List pgsql-hackers

On May 30, 2018 9:45:32 AM EDT, Antonin Houska <ah@cybertec.at> wrote:
>Alvaro Herrera <alvherre@2ndquadrant.com> 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?
>
>Right, the current callers in the core do not seem to use that
>function. I hit
>the issue when doing and testing some changes in an extension
>(pg_squeeze).

What is that extension doing with that snapshot?

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Incorrect visibility test function assigned to snapshot
Next
From: Antonin Houska
Date:
Subject: Re: Incorrect visibility test function assigned to snapshot