- Notifications
You must be signed in to change notification settings - Fork5
Commit182db07
committed
Fix test about ignoring extension dependencies during extension scripts.
Commit08dd23c introduced an exception to the rule that extension memberobjects can only be dropped as part of dropping the whole extension,intending to allow such drops while running the extension's own creation orupdate scripts. However, the exception was only applied at the outermostrecursion level, because it was modeled on a pre-existing check to ignoredependencies on objects listed in pendingObjects. Bug #14434 from PhilippeBeaudoin shows that this is inadequate: in some cases we can reach anextension member object by recursion from another one. (The bug concernsthe serial-sequence case; I'm not sure if there are other cases, but theremight well be.)To fix, revert08dd23c's changes to findDependentObjects() and insteadapply the creating_extension exception regardless of stack level.Having seen this example, I'm a bit suspicious that the pendingObjectslogic is also wrong and such cases should likewise be allowed at anyrecursion level. However, changing that would interact in subtle wayswith the recursion logic (at least it would need to be moved to after therecursing-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 suitabletest infrastructure exists, add a regression test case based on thebug report.Report: <20161125151448.6529.33039@wrigleys.postgresql.org>Discussion: <13224.1480177514@sss.pgh.pa.us>1 parent2732705 commit182db07
File tree
7 files changed
+87
-29
lines changed- src
- backend/catalog
- test/modules/test_extensions
- expected
- sql
7 files changed
+87
-29
lines changedLines changed: 25 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
594 | 594 |
| |
595 | 595 |
| |
596 | 596 |
| |
597 |
| - | |
| 597 | + | |
598 | 598 |
| |
599 | 599 |
| |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
600 | 618 |
| |
601 | 619 |
| |
602 | 620 |
| |
603 | 621 |
| |
604 | 622 |
| |
605 |
| - | |
606 |
| - | |
607 |
| - | |
608 |
| - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
609 | 629 |
| |
610 | 630 |
| |
611 | 631 |
| |
612 | 632 |
| |
613 | 633 |
| |
614 |
| - | |
615 |
| - | |
616 |
| - | |
617 |
| - | |
618 |
| - | |
619 |
| - | |
620 | 634 |
| |
621 | 635 |
| |
622 | 636 |
| |
| |||
625 | 639 |
| |
626 | 640 |
| |
627 | 641 |
| |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 |
| - | |
639 |
| - | |
640 |
| - | |
641 |
| - | |
642 |
| - | |
643 | 642 |
| |
644 | 643 |
| |
645 | 644 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 |
| - | |
10 |
| - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + |
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
0 commit comments
Comments
(0)