From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: How do concurrent inserts work? |
Date: | 2014-12-27 16:08:12 |
Message-ID: | 1419696492526-5832167.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Yaroslav wrote
>
> Serge Fonville wrote
>> When I tested the same queries I get the same behaviour.
>> When both are SERIALIZABLE, the second insert just waits
>>
>> When one is default (unspecified) and the other is SERIALIZABLE, the
>> behaviour is the same as you describe.
> Just re-tested, and no, it doesn't wait and behaves exactly as I
> described.
> My PostgreSQL version is: "PostgreSQL 9.3.4, compiled by Visual C++ build
> 1600, 32-bit", if it's relevant.
Thinking aloud here but...
There is nothing that says you must be able to see the value with which you
are conflicting. The argument boils down to when the error occurs:
mid-transaction or at commit. Mid-transaction is definitely more useful...
Savepoints and serializable transactions, iirc, are problematic in joint
usage because of the usual flow of control and this behavior where you are
trying to use data in-transaction that you cannot see but that the system
knows you are conflicted with. The system largely expects the error to
stick and for you to likely retry the whole thing and not just rollback to a
savepoint.
David J.
--
View this message in context: http://postgresql.nabble.com/How-do-concurrent-inserts-work-tp5832157p5832167.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-12-27 17:52:17 | Re: How do concurrent inserts work? |
Previous Message | Yaroslav | 2014-12-27 12:19:18 | Re: How do concurrent inserts work? |