forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit83c2492
committed
Enforce a specific order for probing library loadability in pg_upgrade.
pg_upgrade checks whether all the shared libraries used in the old clusterare also available in the new one by issuing LOAD for each library name.Previously, it cared not what order it did the LOADs in. Ideally itshould not have to care, but currently the transform modules in contribfail unless both the language and datatype modules they depend on areloaded first. A backend-side solution for that looks possible butprobably not back-patchable, so as a stopgap measure, let's do the LOADtests in order by library name length. That should fix the problem forreasonably-named transform modules, eg "hstore_plpython" will be loadedafter both "hstore" and "plpython". (Yeah, it's a hack.)In a larger sense, having a predictable order of these probes is a goodthing, since it will make upgrades predictably work or not work in theface of inter-library dependencies. Also, this patch replaces O(N^2)de-duplication logic with O(N log N) logic, which could matter ininstallations with very many databases. So I don't foresee reverting thiseven after we have a proper fix for the library-dependency problem.In passing, improve a couple of SQL queries used here.Per complaint from Andrew Dunstan that pg_upgrade'ing the transform contribmodules failed. Back-patch to 9.5 where transform modules were introduced.Discussion: <f7ac29f3-515c-2a44-21c5-ec925053265f@dunslane.net>1 parente94568e commit83c2492
1 file changed
+67
-30
lines changedLines changed: 67 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
15 | 40 |
| |
16 | 41 |
| |
17 | 42 |
| |
| |||
38 | 63 |
| |
39 | 64 |
| |
40 | 65 |
| |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 66 | + | |
45 | 67 |
| |
46 | 68 |
| |
47 | 69 |
| |
48 |
| - | |
49 |
| - | |
| 70 | + | |
| 71 | + | |
50 | 72 |
| |
51 | 73 |
| |
| 74 | + | |
52 | 75 |
| |
53 | 76 |
| |
54 | 77 |
| |
| |||
69 | 92 |
| |
70 | 93 |
| |
71 | 94 |
| |
72 |
| - | |
73 |
| - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
74 | 98 |
| |
75 | 99 |
| |
76 |
| - | |
| 100 | + | |
77 | 101 |
| |
78 |
| - | |
| 102 | + | |
| 103 | + | |
79 | 104 |
| |
80 | 105 |
| |
81 | 106 |
| |
| |||
112 | 137 |
| |
113 | 138 |
| |
114 | 139 |
| |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 | 140 |
| |
119 |
| - | |
120 |
| - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
121 | 150 |
| |
| 151 | + | |
122 | 152 |
| |
123 | 153 |
| |
124 | 154 |
| |
| |||
131 | 161 |
| |
132 | 162 |
| |
133 | 163 |
| |
134 |
| - | |
135 |
| - | |
136 | 164 |
| |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
| 165 | + | |
147 | 166 |
| |
148 |
| - | |
149 | 167 |
| |
150 | 168 |
| |
151 | 169 |
| |
152 |
| - | |
153 |
| - | |
154 | 170 |
| |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
155 | 192 |
| |
156 | 193 |
| |
157 | 194 |
| |
|
0 commit comments
Comments
(0)