• Tom Lane's avatar
    Fix incorrect checking of deferred exclusion constraint after a HOT update. · 20781765
    Tom Lane authored
    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.
    20781765
constraints.source 24.3 KB