pgsql: Add missing CommandCounterIncrement - Mailing list pgsql-committers

From Álvaro Herrera
Subject pgsql: Add missing CommandCounterIncrement
Date
Msg-id E1tc5eN-003gLV-5n@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add missing CommandCounterIncrement

For commit b663b9436e75 I thought this was useless, but turns out not to
be for the case where a partitioned table has two identical foreign key
constraints which can both be matched by the same constraint in a
partition during attach.  This CCI makes the match search for the second
constraint in the parent ignore the constraint in the child that has
already been matched by the first constraint in the parent.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0a16c8326c5a14abd180eeefe5e5ee4263513c2a

Modified Files
--------------
src/backend/commands/tablecmds.c          | 20 ++++++++++----------
src/test/regress/expected/foreign_key.out | 10 ++++++++++
src/test/regress/sql/foreign_key.sql      | 11 +++++++++++
3 files changed, 31 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page
Next
From: Noah Misch
Date:
Subject: pgsql: Test postmaster with program_options_handling_ok() et al.