forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5b44a31
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 parent765f76d commit5b44a31
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3230 | 3230 |
| |
3231 | 3231 |
| |
3232 | 3232 |
| |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
3233 | 3239 |
| |
3234 | 3240 |
| |
3235 | 3241 |
| |
3236 | 3242 |
| |
3237 | 3243 |
| |
3238 | 3244 |
| |
3239 | 3245 |
| |
3240 |
| - | |
3241 |
| - | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
3242 | 3250 |
| |
3243 | 3251 |
| |
3244 | 3252 |
| |
| |||
3287 | 3295 |
| |
3288 | 3296 |
| |
3289 | 3297 |
| |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
3290 | 3304 |
| |
3291 | 3305 |
| |
3292 | 3306 |
| |
3293 | 3307 |
| |
3294 | 3308 |
| |
3295 | 3309 |
| |
3296 | 3310 |
| |
3297 |
| - | |
3298 |
| - | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
3299 | 3315 |
| |
3300 | 3316 |
| |
3301 | 3317 |
| |
|
0 commit comments
Comments
(0)