From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'Kevin Grittner *EXTERN*'" <kgrittn(at)gmail(dot)com>, Jason Dusek <jason(dot)dusek(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SERIALIZABLE and INSERTs with multiple VALUES |
Date: | 2016-10-12 07:50:26 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B5392FF22@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Kevin Grittner wrote:
> Sent: Tuesday, October 11, 2016 10:00 PM
> To: Jason Dusek
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES
>
> On Tue, Oct 11, 2016 at 2:29 PM, Jason Dusek <jason(dot)dusek(at)gmail(dot)com> wrote:
>
>> I notice the following oddity:
>
>> =# CREATE TABLE with_pk (i integer PRIMARY KEY);
>> CREATE TABLE
>
>> =# BEGIN;
>> BEGIN
>> =# INSERT INTO with_pk VALUES (2), (2) ON CONFLICT DO NOTHING;
>> ERROR: could not serialize access due to concurrent update
>> =# END;
>> ROLLBACK
>
> I don't see that on development HEAD. What version are you
> running? What is your setting for default_transaction_isolation?
The subject says SERIALIZABLE, and I can see it on my 9.5.4 database:
test=> CREATE TABLE with_pk (i integer PRIMARY KEY);
CREATE TABLE
test=> START TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION
test=> INSERT INTO with_pk VALUES (2), (2) ON CONFLICT DO NOTHING;
ERROR: could not serialize access due to concurrent update
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | arnaud gaboury | 2016-10-12 08:30:19 | Re: confusion about user paring with pg_hba and pg_ident |
Previous Message | Martijn Tonies (Upscene Productions) | 2016-10-12 06:51:12 | Re: ANN: Upscene releases Database Workbench 5.2.4 |