pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Check for pending trigger events on far end when dropping an FK 6+ messages / 1 participants [nested] [flat]
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/4e026b32d4024b03856b4981b26c747b7fef7afb Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/bf5fe7bfa0e8bdc87be94b98bbdcb26054a6b75c Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/6cbe84c826b51a159825e9843184c7b4a740e4ae Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f7166ce243aec3f5df454377d81b67032d85f35c Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/05bef7b0884d85c25a3c8a5060c6389e6da52531 Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
* pgsql: Check for pending trigger events on far end when dropping an FK @ 2016-11-25 18:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-11-25 18:45 UTC (permalink / raw) To: pgsql-committers Check for pending trigger events on far end when dropping an FK constraint. When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT, we refuse the drop if there are any pending trigger events on the named table; this ensures that we won't remove the pg_trigger row that will be consulted by those events. But we should make the same check for the referenced relation, else we might remove a due-to-be-referenced pg_trigger row for that relation too, resulting in "could not find trigger NNN" or "relation NNN has no triggers" errors at commit. Per bug #14431 from Benjie Gillam. Back-patch to all supported branches. Report: <20161124114911.6530.31200@wrigleys.postgresql.org> Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/6a363a4c252329f1f97d80526eb55b3301abf1f2 Modified Files -------------- src/backend/commands/tablecmds.c | 18 ++++++++++++++++++ src/test/regress/expected/foreign_key.out | 13 +++++++++++++ src/test/regress/sql/foreign_key.sql | 13 +++++++++++++ 3 files changed, 44 insertions(+) -- 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] 6+ messages in thread
end of thread, other threads:[~2016-11-25 18:45 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK Tom Lane <tgl@sss.pgh.pa.us> 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK Tom Lane <tgl@sss.pgh.pa.us> 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK Tom Lane <tgl@sss.pgh.pa.us> 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK Tom Lane <tgl@sss.pgh.pa.us> 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK Tom Lane <tgl@sss.pgh.pa.us> 2016-11-25 18:45 pgsql: Check for pending trigger events on far end when dropping an FK 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