pgsql: Fix incorrect checking of deferred exclusion constraint after a

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix incorrect checking of deferred exclusion constraint after a
Дата
Msg-id E1YrqWi-00049y-LP@gemulon.postgresql.org
обсуждение исходный текст
Список 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/20781765f77c1fb6465aba97d211636ce92e7a0e

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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix incorrect checking of deferred exclusion constraint after a
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: pg_upgrade: use single or double-quotes in command-line strings