pgsql: Back-patch fcff8a575198478023ada8a48e13b50f70054766 as a bug fix

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Back-patch fcff8a575198478023ada8a48e13b50f70054766 as a bug fix
Date: 2016-12-14 01:20:27
Message-ID: E1cGyF9-0007S1-M3@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Back-patch fcff8a575198478023ada8a48e13b50f70054766 as a bug fix.

When there is both a serialization failure and a unique violation,
throw the former rather than the latter. When initially pushed,
this was viewed as a feature to assist application framework
developers, so that they could more accurately determine when to
retry a failed transaction, but a test case presented by Ian
Jackson has shown that this patch can prevent serialization
anomalies in some cases where a unique violation is caught within a
subtransaction, the work of that subtransaction is discarded, and
no error is thrown. That makes this a bug fix, so it is being
back-patched to all supported branches where it is not already
present (i.e., 9.2 to 9.5).

Discussion: https://postgr.es/m/1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com
Discussion: https://postgr.es/m/22607.56276.807567.924144@mariner.uk.xensource.com

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bed2a0b06ba54266a4e66affbc8f08e5eea6e8bc

Modified Files
--------------
doc/src/sgml/mvcc.sgml | 35 ++++++++++++----
src/backend/access/nbtree/nbtinsert.c | 8 ++++
.../isolation/expected/read-write-unique-2.out | 29 +++++++++++++
.../isolation/expected/read-write-unique-3.out | 12 ++++++
.../isolation/expected/read-write-unique-4.out | 41 ++++++++++++++++++
src/test/isolation/expected/read-write-unique.out | 29 +++++++++++++
src/test/isolation/isolation_schedule | 4 ++
src/test/isolation/specs/read-write-unique-2.spec | 36 ++++++++++++++++
src/test/isolation/specs/read-write-unique-3.spec | 33 +++++++++++++++
src/test/isolation/specs/read-write-unique-4.spec | 48 ++++++++++++++++++++++
src/test/isolation/specs/read-write-unique.spec | 39 ++++++++++++++++++
11 files changed, 307 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2016-12-14 06:18:06 Re: pgsql: Fix bugs in RelationGetPartitionDispatchInfo.
Previous Message Tom Lane 2016-12-13 21:33:17 pgsql: Improve handling of array elements as getdiag_targets and cursor