Skip site navigation (1) Skip section navigation (2)

pgsql: Repair problems occurring when multiple RI updates have to be

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Repair problems occurring when multiple RI updates have to be
Date: 2007-08-15 19:15:47
Message-ID: 20070815191547.14D5A754259@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
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.

Modified Files:
--------------
    pgsql/src/backend/commands:
        trigger.c (r1.216 -> r1.217)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.216&r2=1.217)
    pgsql/src/backend/executor:
        spi.c (r1.179 -> r1.180)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.179&r2=1.180)
    pgsql/src/backend/utils/adt:
        ri_triggers.c (r1.95 -> r1.96)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c?r1=1.95&r2=1.96)
    pgsql/src/include/executor:
        spi.h (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?r1=1.62&r2=1.63)
    pgsql/src/test/regress/expected:
        foreign_key.out (r1.44 -> r1.45)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/foreign_key.out?r1=1.44&r2=1.45)
    pgsql/src/test/regress/sql:
        foreign_key.sql (r1.20 -> r1.21)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/foreign_key.sql?r1=1.20&r2=1.21)

Responses

pgsql-hackers by date

Next:From: Zoltan BoszormenyiDate: 2007-08-15 19:23:51
Subject: Re: XID wraparound and busy databases
Previous:From: Bruce MomjianDate: 2007-08-15 19:15:46
Subject: Re: Another idea for index-only scans

pgsql-committers by date

Next:From: Tom LaneDate: 2007-08-15 19:15:55
Subject: pgsql: Repair problems occurring when multiple RI updates have to be
Previous:From: User MhaDate: 2007-08-15 19:01:27
Subject: pginstaller - web: Fix spelling error, per Leoj in pgsql bug report

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group