forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8e4b147
committed
Add CheckTableNotInUse calls in DROP TABLE and DROP INDEX.
Recent releases had a check on rel->rd_refcnt in heap_drop_with_catalog,but failed to cover the possibility of pending trigger events at DROP time.(Before 8.4 we didn't even check the refcnt.) When the trigger events wereeventually fired, you'd get "could not open relation with OID nnn" errors,as in recent report from strk. Better to throw a suitable error when theDROP is attempted.Also add a similar check in DROP INDEX.Back-patch to all supported branches.1 parent888fda8 commit8e4b147
File tree
3 files changed
+12
-10
lines changed- src
- backend/catalog
- interfaces/ecpg/test/expected
3 files changed
+12
-10
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1532 | 1532 |
| |
1533 | 1533 |
| |
1534 | 1534 |
| |
1535 |
| - | |
| 1535 | + | |
| 1536 | + | |
1536 | 1537 |
| |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
1541 |
| - | |
1542 |
| - | |
| 1538 | + | |
1543 | 1539 |
| |
1544 | 1540 |
| |
1545 | 1541 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 | 1002 |
| |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1003 | 1009 |
| |
1004 | 1010 |
| |
1005 | 1011 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
| 141 | + | |
142 | 142 |
| |
143 |
| - | |
| 143 | + | |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
|
0 commit comments
Comments
(0)