- Notifications
You must be signed in to change notification settings - Fork5k
Commit69bef7f
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 parent13a9a7b commit69bef7f
2 files changed
+13
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1236 | 1236 |
| |
1237 | 1237 |
| |
1238 | 1238 |
| |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1239 | 1246 |
| |
1240 | 1247 |
| |
1241 | 1248 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
848 | 848 |
| |
849 | 849 |
| |
850 | 850 |
| |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
851 | 857 |
| |
852 | 858 |
| |
853 | 859 |
| |
|
0 commit comments
Comments
(0)