forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf56802a
committed
In pg_dump, remember connection passwords no matter how we got them.
When pg_dump prompts the user for a password, it remembers the passwordfor possible re-use by parallel worker processes. However, libpq mighthave extracted the password from a connection string originally passedas "dbname". Since we don't record the original form of dbname butbreak it down to host/port/etc, the password gets lost. Fix that byretrieving the actual password from the PGconn.(It strikes me that this whole approach is rather broken, as it will alsolose other information such as options that might have been present inthe connection string. But we'll leave that problem for another day.)In passing, get rid of rather silly use of malloc() for small fixed-sizearrays.Back-patch to 9.3 where parallel pg_dump was introduced.Report and fix by Zeus Kronion, adjusted a bit by Michael Paquier and me1 parentd07afa4 commitf56802a
1 file changed
+35
-17
lines changedLines changed: 35 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
| 114 | + | |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| 130 | + | |
| 131 | + | |
130 | 132 |
| |
131 | 133 |
| |
132 | 134 |
| |
| |||
136 | 138 |
| |
137 | 139 |
| |
138 | 140 |
| |
139 |
| - | |
140 |
| - | |
141 |
| - | |
| 141 | + | |
| 142 | + | |
142 | 143 |
| |
143 | 144 |
| |
144 | 145 |
| |
| |||
158 | 159 |
| |
159 | 160 |
| |
160 | 161 |
| |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 | 162 |
| |
165 | 163 |
| |
166 | 164 |
| |
| |||
191 | 189 |
| |
192 | 190 |
| |
193 | 191 |
| |
194 |
| - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
195 | 204 |
| |
196 | 205 |
| |
197 | 206 |
| |
| |||
220 | 229 |
| |
221 | 230 |
| |
222 | 231 |
| |
223 |
| - | |
| 232 | + | |
224 | 233 |
| |
225 | 234 |
| |
226 | 235 |
| |
227 | 236 |
| |
228 | 237 |
| |
| 238 | + | |
| 239 | + | |
229 | 240 |
| |
230 | 241 |
| |
231 | 242 |
| |
| |||
240 | 251 |
| |
241 | 252 |
| |
242 | 253 |
| |
243 |
| - | |
244 |
| - | |
245 |
| - | |
| 254 | + | |
| 255 | + | |
246 | 256 |
| |
247 | 257 |
| |
248 | 258 |
| |
| |||
262 | 272 |
| |
263 | 273 |
| |
264 | 274 |
| |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 | 275 |
| |
269 | 276 |
| |
270 | 277 |
| |
| |||
281 | 288 |
| |
282 | 289 |
| |
283 | 290 |
| |
284 |
| - | |
285 |
| - | |
286 | 291 |
| |
287 | 292 |
| |
288 | 293 |
| |
289 | 294 |
| |
290 | 295 |
| |
291 | 296 |
| |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
292 | 310 |
| |
293 | 311 |
| |
294 | 312 |
| |
|
0 commit comments
Comments
(0)