SERIALIZABLE and INSERTs with multiple VALUES - Mailing list pgsql-general

From Jason Dusek
Subject SERIALIZABLE and INSERTs with multiple VALUES
Date
Msg-id CAO3NbwOycQjt2Oqy2VW-eLTq2M5uGMyHnGm=RNga4mjqcYD7gQ@mail.gmail.com
Whole thread Raw
Responses Re: SERIALIZABLE and INSERTs with multiple VALUES  (Kevin Grittner <kgrittn@gmail.com>)
List pgsql-general

Hi All,

I notice the following oddity:

 =# CREATE TABLE with_pk (i integer PRIMARY KEY);
CREATE TABLE
=# BEGIN;
BEGIN=# INSERT INTO with_pk VALUES (1) ON CONFLICT DO NOTHING;
INSERT 0 1=# INSERT INTO with_pk VALUES (1) ON CONFLICT DO NOTHING;
INSERT 0 0=# END;
COMMIT
=# BEGIN;
BEGIN=# INSERT INTO with_pk VALUES (2), (2) ON CONFLICT DO NOTHING;
ERROR:  could not serialize access due to concurrent update=# END;
ROLLBACK

How are these two transactions different?

Kind Regards,

  Jason Dusek

pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: My DB has has 5TB, many operations are very slow (on Google Cloud Compute)
Next
From: Melvin Davidson
Date:
Subject: Re: My DB has has 5TB, many operations are very slow (on Google Cloud Compute)