forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteff027c
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 parentfe8f15d commiteff027c
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 | |
---|---|---|---|
| |||
1603 | 1603 |
| |
1604 | 1604 |
| |
1605 | 1605 |
| |
1606 |
| - | |
| 1606 | + | |
| 1607 | + | |
1607 | 1608 |
| |
1608 |
| - | |
1609 |
| - | |
1610 |
| - | |
1611 |
| - | |
1612 |
| - | |
1613 |
| - | |
| 1609 | + | |
1614 | 1610 |
| |
1615 | 1611 |
| |
1616 | 1612 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1298 | 1298 |
| |
1299 | 1299 |
| |
1300 | 1300 |
| |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
1301 | 1307 |
| |
1302 | 1308 |
| |
1303 | 1309 |
| |
|
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)