pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Antonin Houska <ah@cybertec.at>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Incorrect visibility test function assigned to snapshot
Date: Wed, 30 May 2018 09:28:54 -0400
Message-ID: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql> (raw)
In-Reply-To: <23215.1527665193@localhost>

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?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (12+ messages)  latest in thread

Message-ID: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql>
Permalink:  ../20180530132854.tkv37qiamepu3slh@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180530132854.tkv37qiamepu3slh@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, ah@cybertec.at
  Subject: Re: Incorrect visibility test function assigned to snapshot
  In-Reply-To: <20180530132854.tkv37qiamepu3slh@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox