forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit531cbd8
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 parentf2eba40 commit531cbd8
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3052 | 3052 |
| |
3053 | 3053 |
| |
3054 | 3054 |
| |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
3055 | 3061 |
| |
3056 | 3062 |
| |
3057 | 3063 |
| |
3058 | 3064 |
| |
3059 | 3065 |
| |
3060 | 3066 |
| |
3061 | 3067 |
| |
3062 |
| - | |
3063 |
| - | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
3064 | 3072 |
| |
3065 | 3073 |
| |
3066 | 3074 |
| |
| |||
3102 | 3110 |
| |
3103 | 3111 |
| |
3104 | 3112 |
| |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
3105 | 3119 |
| |
3106 | 3120 |
| |
3107 | 3121 |
| |
3108 | 3122 |
| |
3109 | 3123 |
| |
3110 | 3124 |
| |
3111 | 3125 |
| |
3112 |
| - | |
3113 |
| - | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
3114 | 3130 |
| |
3115 | 3131 |
| |
3116 | 3132 |
| |
|
0 commit comments
Comments
(0)