Re: Question about RI checks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Nick Barnes <nickbarnes01(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Question about RI checks
Date: 2014-10-24 17:32:31
Message-ID: CA+TgmoZ2==WsaRPZahnTkTR=f5625YXnrU7CohUsBO75Nv1HqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 24, 2014 at 1:28 PM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
> The only other option I see would be so teach the executor to check
> whether *any* snapshot between the transaction's snapshot and a current
> snapshot would see a different set of rows. Simply checking whether both
> the current snapshot and the transaction's snapshot see the same set isn't
> sufficient, per the counter-example in my other mail :-(

What about doing one scan using SnapshotAny and then testing each
returned row for visibility under both relevant snapshots? See
whether there is any tuple for which they disagree.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-10-24 17:42:04 Re: Typo fixes for pg_recvlogical documentation
Previous Message Robert Haas 2014-10-24 17:30:46 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}