Re: WIP: Detecting SSI conflicts before reporting constraint violations

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Detecting SSI conflicts before reporting constraint violations
Date: 2016-03-10 21:00:31
Message-ID: CANP8+jJJ9-=j3Z4mORt4EkuSvXEuTZuRtbRphSOm_FdiUEy93w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10 March 2016 at 20:36, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
wrote:

> On Fri, Mar 11, 2016 at 8:50 AM, Simon Riggs <simon(at)2ndquadrant(dot)com>
> wrote:
> > On 3 February 2016 at 23:12, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com
> >
> > wrote:
> >
> >>
> >> It quacks suspiciously like a bug.
> >
> >
> > Agreed
> >
> > What's more important is that is very publicly a bug in the eyes of
> others
> > and should be fixed and backpatched soon.
> >
> > We have a maintenance release coming in a couple of weeks and I'd like to
> > see this in there.
>
> As I understand it, the approach I've taken here can't be backpatched
> because it changes the aminsert_function interface (it needs the
> current snapshot when inserting), so I was proposing this as an
> improvement for 9.6. I guess there are other way to get the right
> snapshot into btinsert (and thence _bt_check_unique), but I didn't
> think it would be very classy to introduce a 'current snapshot' global
> variable to smuggle it in.
>

But this is a Serializable transaction, so it only has one snapshot...

This is where adding comments on patch theory would help.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2016-03-10 21:07:55 Re: auto_explain sample rate
Previous Message Gavin Flower 2016-03-10 20:58:48 Re: Add generate_series(date,date) and generate_series(date,date,integer)