pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CO 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CO @ 2015-05-03 15:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2015-05-03 15:30 UTC (permalink / raw) To: pgsql-committers Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CONSTRAINT. When altering the deferredness state of a foreign key constraint, we correctly updated the catalogs and then invalidated the relcache state for the target relation ... but that's not the only relation with relevant triggers. Must invalidate the other table as well, or the state change fails to take effect promptly for operations triggered on the other table. Per bug #13224 from Christian Ullrich. In passing, reorganize regression test case for this feature so that it isn't randomly injected into the middle of an unrelated test sequence. Oversight in commit f177cbfe676dc2c7ca2b206c54d6bf819feeea8b. Back-patch to 9.4 where the faulty code was added. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a4820434c1a62e0c5f4051a31ad8b4a11f0a6ad7 Modified Files -------------- src/backend/commands/tablecmds.c | 22 ++++++++++++-- src/test/regress/expected/foreign_key.out | 43 ++++++++++++++------------ src/test/regress/sql/foreign_key.sql | 47 +++++++++++++++++------------ 3 files changed, 70 insertions(+), 42 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CO @ 2015-05-03 15:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2015-05-03 15:30 UTC (permalink / raw) To: pgsql-committers Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CONSTRAINT. When altering the deferredness state of a foreign key constraint, we correctly updated the catalogs and then invalidated the relcache state for the target relation ... but that's not the only relation with relevant triggers. Must invalidate the other table as well, or the state change fails to take effect promptly for operations triggered on the other table. Per bug #13224 from Christian Ullrich. In passing, reorganize regression test case for this feature so that it isn't randomly injected into the middle of an unrelated test sequence. Oversight in commit f177cbfe676dc2c7ca2b206c54d6bf819feeea8b. Back-patch to 9.4 where the faulty code was added. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/79edb298128b00161944b0e2cb6ef2460b717a7a Modified Files -------------- src/backend/commands/tablecmds.c | 22 ++++++++++++-- src/test/regress/expected/foreign_key.out | 43 ++++++++++++++------------ src/test/regress/sql/foreign_key.sql | 47 +++++++++++++++++------------ 3 files changed, 70 insertions(+), 42 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-05-03 15:30 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-05-03 15:30 pgsql: Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CO Tom Lane <tgl@sss.pgh.pa.us> 2015-05-03 15:30 pgsql: Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CO Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox