forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc820037
committed
Make getObjectDescription robust against dangling amproc type links.
Yoran Heling reported a case where a data type could be droppedwhile references to its OID remain behind in pg_amproc. Thiscauses getObjectDescription to fail, which blocks dropping theoperator family (since our DROP code likes to construct descriptionsof everything it's dropping). The proper fix for this requiresadding more pg_depend entries. But to allow DROP to go through withalready-corrupt catalogs, tweak getObjectDescription to print "???"for the type instead of failing when it processes such an entry.I changed the logic for pg_amop similarly, for consistency,although it is not known that the problem can manifest in pg_amop.Per report from Yoran Heling. Back-patch to all supportedbranches (although the problem may be unreachable in v13).Discussion:https://postgr.es/m/Z1MVCOh1hprjK5Sf@gmai0211 parent3220cea commitc820037
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3235 | 3235 |
| |
3236 | 3236 |
| |
3237 | 3237 |
| |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
3238 | 3244 |
| |
3239 | 3245 |
| |
3240 | 3246 |
| |
3241 | 3247 |
| |
3242 | 3248 |
| |
3243 | 3249 |
| |
3244 | 3250 |
| |
3245 |
| - | |
3246 |
| - | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
3247 | 3255 |
| |
3248 | 3256 |
| |
3249 | 3257 |
| |
| |||
3292 | 3300 |
| |
3293 | 3301 |
| |
3294 | 3302 |
| |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
3295 | 3309 |
| |
3296 | 3310 |
| |
3297 | 3311 |
| |
3298 | 3312 |
| |
3299 | 3313 |
| |
3300 | 3314 |
| |
3301 | 3315 |
| |
3302 |
| - | |
3303 |
| - | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
3304 | 3320 |
| |
3305 | 3321 |
| |
3306 | 3322 |
| |
|
0 commit comments
Comments
(0)