From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix incorrect checking of deferred exclusion constraint after a |
Date: | 2015-05-11 16:25:56 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix incorrect checking of deferred exclusion constraint after a HOT update.
If a row that potentially violates a deferred exclusion constraint is
HOT-updated later in the same transaction, the exclusion constraint would
be reported as violated when the check finally occurs, even if the row(s)
the new row originally conflicted with have since been removed. This
happened because the wrong TID was passed to check_exclusion_constraint(),
causing the live HOT-updated row to be seen as a conflicting row rather
than recognized as the row-under-test.
Per bug #13148 from Evan Martin. It's been broken since exclusion
constraints were invented, so back-patch to all supported branches.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/dd75518d523a1e3650b5d5ad20c755a000425739
Modified Files
--------------
src/backend/commands/constraint.c | 17 +++++++++++------
src/test/regress/input/constraints.source | 10 ++++++++++
src/test/regress/output/constraints.source | 14 ++++++++++++++
3 files changed, 35 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2015-05-11 16:57:56 | pgsql: pg_upgrade: use single or double-quotes in command-line strings |
Previous Message | Robert Haas | 2015-05-11 16:17:44 | pgsql: Increase threshold for multixact member emergency autovac to 50% |