mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-11 06:26:55 +02:00
182db07040
Commit 08dd23cec
introduced an exception to the rule that extension member
objects can only be dropped as part of dropping the whole extension,
intending to allow such drops while running the extension's own creation or
update scripts. However, the exception was only applied at the outermost
recursion level, because it was modeled on a pre-existing check to ignore
dependencies on objects listed in pendingObjects. Bug #14434 from Philippe
Beaudoin shows that this is inadequate: in some cases we can reach an
extension member object by recursion from another one. (The bug concerns
the serial-sequence case; I'm not sure if there are other cases, but there
might well be.)
To fix, revert 08dd23cec's changes to findDependentObjects() and instead
apply the creating_extension exception regardless of stack level.
Having seen this example, I'm a bit suspicious that the pendingObjects
logic is also wrong and such cases should likewise be allowed at any
recursion level. However, changing that would interact in subtle ways
with the recursion logic (at least it would need to be moved to after the
recursing-from check). Given that the code's been like that a long time,
I'll refrain from touching it without a clear example showing it's wrong.
Back-patch to all active branches. In HEAD and 9.6, where suitable
test infrastructure exists, add a regression test case based on the
bug report.
Report: <20161125151448.6529.33039@wrigleys.postgresql.org>
Discussion: <13224.1480177514@sss.pgh.pa.us>
25 lines
823 B
Makefile
25 lines
823 B
Makefile
# src/test/modules/test_extensions/Makefile
|
|
|
|
MODULE = test_extensions
|
|
PGFILEDESC = "test_extensions - regression testing for EXTENSION support"
|
|
|
|
EXTENSION = test_ext1 test_ext2 test_ext3 test_ext4 test_ext5 test_ext6 \
|
|
test_ext7 test_ext_cyclic1 test_ext_cyclic2
|
|
DATA = test_ext1--1.0.sql test_ext2--1.0.sql test_ext3--1.0.sql \
|
|
test_ext4--1.0.sql test_ext5--1.0.sql test_ext6--1.0.sql \
|
|
test_ext7--1.0.sql test_ext7--1.0--2.0.sql \
|
|
test_ext_cyclic1--1.0.sql test_ext_cyclic2--1.0.sql
|
|
|
|
REGRESS = test_extensions test_extdepend
|
|
|
|
ifdef USE_PGXS
|
|
PG_CONFIG = pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|
|
else
|
|
subdir = src/test/modules/test_extensions
|
|
top_builddir = ../../../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
endif
|