Thread: pgsql: Repair problems occurring when multiple RI updates have to be
pgsql: Repair problems occurring when multiple RI updates have to be
From
tgl@postgresql.org (Tom Lane)
Date:
Log Message: ----------- Repair problems occurring when multiple RI updates have to be done to the same row within one query: we were firing check triggers before all the updates were done, leading to bogus failures. Fix by making the triggers queued by an RI update go at the end of the outer query's trigger event list, thereby effectively making the processing "breadth-first". This was indeed how it worked pre-8.0, so the bug does not occur in the 7.x branches. Per report from Pavel Stehule. Tags: ---- REL8_0_STABLE Modified Files: -------------- pgsql/src/backend/commands: trigger.c (r1.177.4.3 -> r1.177.4.4) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.177.4.3&r2=1.177.4.4) pgsql/src/backend/executor: spi.c (r1.133.4.2 -> r1.133.4.3) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.133.4.2&r2=1.133.4.3) pgsql/src/backend/utils/adt: ri_triggers.c (r1.76.4.1 -> r1.76.4.2) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c?r1=1.76.4.1&r2=1.76.4.2) pgsql/src/include/executor: spi.h (r1.50 -> r1.50.4.1) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?r1=1.50&r2=1.50.4.1) pgsql/src/test/regress/expected: foreign_key.out (r1.38.4.1 -> r1.38.4.2) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/foreign_key.out?r1=1.38.4.1&r2=1.38.4.2) pgsql/src/test/regress/sql: foreign_key.sql (r1.15.4.1 -> r1.15.4.2) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/foreign_key.sql?r1=1.15.4.1&r2=1.15.4.2)