Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0 - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Date
Msg-id CAM3SWZQoFW2W9GOH0WqCCOe53KZN7wgjtk19F5o67+Jq-YY9HA@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0  (Andres Freund <andres@anarazel.de>)
Responses Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
List pgsql-hackers
On Thu, Apr 16, 2015 at 2:23 AM, Andres Freund <andres@anarazel.de> wrote:
> I'm, completely independent of logical decoding, of the *VERY* strong
> opinion that 'speculative insertions' should never be visible when
> looking with normal snapshots. For one it allows to simplify
> considerations around wraparound (which has proven to be a very good
> idea, c.f. multixacts + vacuum causing data corruption years after it
> was thought to be harmless). For another it allows to reclaim/redefine
> the bit after a database restart/upgrade. Given how complex this is and
> how scarce flags are that seems like a really good property.
>
> And avoiding those flags to be visible to the outside requires a WAL
> record, otherwise it won't be correct on the standby.

I'm a bit distracted here, and not sure exactly what you mean. What's
a normal snapshot?

Do you just mean that you think that speculative insertions should be
explicitly affirmed by a second record (making it not a speculative
tuple, but rather, a fully fledged tuple)? IOW, an MVCC snapshot has
no chance of seeing a tuple until it was affirmed by a second in-place
modification, regardless of tuple xmin xact commit status?

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/
Next
From: jltallon@adv-solutions.net
Date:
Subject: Re: PATCH: default_index_tablespace