Commit 3125a5b
committed
Fix possible future cache reference leak in ALTER EXTENSION ADD/DROP.
recordExtObjInitPriv and removeExtObjInitPriv were sloppy about
calling ReleaseSysCache. The cases cannot occur given current usage
in ALTER EXTENSION ADD/DROP, since we wouldn't get here for these
relkinds; but it seems wise to clean up better.
In passing, extend test logic in test_pg_dump to exercise the
dropped-column code paths here.
Since the case is unreachable at present, there seems no great
need to back-patch; hence fix HEAD only.
Kyotaro Horiguchi, with test case and comment adjustments by me
Discussion: https://postgr.es/m/20200417.151831.1153577605111650154.horikyota.ntt@gmail.com1 parent 4db819b commit 3125a5b
File tree
4 files changed
+35
-20
lines changed- src
- backend/catalog
- test/modules/test_pg_dump
- expected
- sql
4 files changed
+35
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5580 | 5580 | | |
5581 | 5581 | | |
5582 | 5582 | | |
5583 | | - | |
| 5583 | + | |
| 5584 | + | |
| 5585 | + | |
| 5586 | + | |
| 5587 | + | |
5584 | 5588 | | |
5585 | | - | |
5586 | | - | |
5587 | | - | |
5588 | | - | |
5589 | | - | |
| 5589 | + | |
| 5590 | + | |
| 5591 | + | |
| 5592 | + | |
5590 | 5593 | | |
| 5594 | + | |
5591 | 5595 | | |
5592 | 5596 | | |
5593 | | - | |
5594 | | - | |
5595 | | - | |
| 5597 | + | |
| 5598 | + | |
5596 | 5599 | | |
5597 | 5600 | | |
5598 | 5601 | | |
| |||
5724 | 5727 | | |
5725 | 5728 | | |
5726 | 5729 | | |
| 5730 | + | |
| 5731 | + | |
| 5732 | + | |
| 5733 | + | |
| 5734 | + | |
5727 | 5735 | | |
5728 | 5736 | | |
5729 | 5737 | | |
| |||
5866 | 5874 | | |
5867 | 5875 | | |
5868 | 5876 | | |
5869 | | - | |
| 5877 | + | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
5870 | 5882 | | |
5871 | | - | |
5872 | | - | |
5873 | | - | |
5874 | | - | |
5875 | | - | |
| 5883 | + | |
| 5884 | + | |
| 5885 | + | |
| 5886 | + | |
5876 | 5887 | | |
| 5888 | + | |
5877 | 5889 | | |
5878 | 5890 | | |
5879 | | - | |
5880 | | - | |
5881 | | - | |
| 5891 | + | |
| 5892 | + | |
5882 | 5893 | | |
5883 | 5894 | | |
5884 | 5895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
0 commit comments