forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5f38403
committed
Refactor parallelization processing code in src/bin/scripts/
The existing facility of vacuumdb to handle parallel connections into agiven database with an authentication set is moved to a common file insrc/bin/scripts/, named scripts_parallel.c. This introduces a set ofroutines to initialize, wait and terminate a set of connections,simplifying a bit the code of vacuumdb on the way. More routinesrelated to result handling and database connection are moved tocommon.c.The initial plan is to use that for reindexdb, but it could be appliedto other tools like clusterdb.While on it, clean up a set of variables "progname" which were definedas routine arguments for error messages. Since most of the callers haveswitched to pg_log_error() and such there is no need for this variable.Author: Julien RouhaudReviewed-by: Michael Paquier, Álvaro HerreraDiscussion:https://postgr.es/m/CAOBaU_YrnH_Jqo46NhaJ7uRBiWWEcS40VNRQxgFbqYo9kApUsg@mail.gmail.com1 parentb538c90 commit5f38403
File tree
8 files changed
+446
-383
lines changed- src/bin/scripts
8 files changed
+446
-383
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
| 53 | + | |
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 |
| - | |
| 209 | + | |
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
| |||
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
242 |
| - | |
| 242 | + | |
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
|
Lines changed: 84 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
27 | 29 |
| |
| |||
146 | 148 |
| |
147 | 149 |
| |
148 | 150 |
| |
149 |
| - | |
150 |
| - | |
| 151 | + | |
151 | 152 |
| |
152 | 153 |
| |
153 | 154 |
| |
| |||
178 | 179 |
| |
179 | 180 |
| |
180 | 181 |
| |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
181 | 206 |
| |
182 | 207 |
| |
183 | 208 |
| |
184 | 209 |
| |
185 |
| - | |
| 210 | + | |
186 | 211 |
| |
187 | 212 |
| |
188 | 213 |
| |
| |||
207 | 232 |
| |
208 | 233 |
| |
209 | 234 |
| |
210 |
| - | |
211 |
| - | |
| 235 | + | |
212 | 236 |
| |
213 | 237 |
| |
214 | 238 |
| |
| |||
255 | 279 |
| |
256 | 280 |
| |
257 | 281 |
| |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
258 | 333 |
| |
259 | 334 |
| |
260 | 335 |
| |
| |||
299 | 374 |
| |
300 | 375 |
| |
301 | 376 |
| |
302 |
| - | |
| 377 | + | |
303 | 378 |
| |
304 | 379 |
| |
305 | 380 |
| |
| |||
324 | 399 |
| |
325 | 400 |
| |
326 | 401 |
| |
327 |
| - | |
| 402 | + | |
328 | 403 |
| |
329 | 404 |
| |
330 | 405 |
| |
331 | 406 |
| |
332 | 407 |
| |
333 | 408 |
| |
334 | 409 |
| |
335 |
| - | |
| 410 | + | |
336 | 411 |
| |
337 | 412 |
| |
338 | 413 |
| |
| |||
351 | 426 |
| |
352 | 427 |
| |
353 | 428 |
| |
354 |
| - | |
355 |
| - | |
| 429 | + | |
356 | 430 |
| |
357 | 431 |
| |
358 | 432 |
| |
|
Lines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
43 |
| - | |
| 42 | + | |
44 | 43 |
| |
45 |
| - | |
46 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 |
| |
52 | 56 |
| |
53 | 57 |
| |
54 | 58 |
| |
55 |
| - | |
| 59 | + | |
56 | 60 |
| |
57 | 61 |
| |
58 | 62 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
351 |
| - | |
| 351 | + | |
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
408 |
| - | |
| 408 | + | |
409 | 409 |
| |
410 | 410 |
| |
411 | 411 |
| |
|
0 commit comments
Comments
(0)