forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc4ba87f
committed
pg_resetxlog: add option to set oldest xid & use by pg_upgrade
Add pg_resetxlog -u option to set the oldest xid in pg_control.Previously -x set this value be -2 billion less than the -x value.However, this causes the server to immediately scan all relation'srelfrozenxid so it can advance pg_control's oldest xid to be inside theautovacuum_freeze_max_age range, which is inefficient and might disruptdiagnostic recovery. pg_upgrade will use this option to better createthe new cluster to match the old cluster.Reported-by: Jason Harvey, Floris Van NeeDiscussion:https://postgr.es/m/20190615183759.GB239428@rfd.leadboat.com, 87da83168c644fd9aae38f546cc70295@opammb0562.comp.optiver.comAuthor: Bertrand DrouvotBackpatch-through: 9.61 parent9c6fa34 commitc4ba87f
File tree
5 files changed
+82
-29
lines changed- doc/src/sgml/ref
- src/bin
- pg_resetwal
- pg_upgrade
5 files changed
+82
-29
lines changedLines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
297 | 297 |
| |
298 | 298 |
| |
299 | 299 |
| |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
300 | 320 |
| |
301 | 321 |
| |
302 | 322 |
| |
|
Lines changed: 38 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
| |||
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
| 105 | + | |
104 | 106 |
| |
105 | 107 |
| |
106 | 108 |
| |
| |||
135 | 137 |
| |
136 | 138 |
| |
137 | 139 |
| |
138 |
| - | |
| 140 | + | |
139 | 141 |
| |
140 | 142 |
| |
141 | 143 |
| |
| |||
168 | 170 |
| |
169 | 171 |
| |
170 | 172 |
| |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
171 | 188 |
| |
172 | 189 |
| |
173 | 190 |
| |
| |||
433 | 450 |
| |
434 | 451 |
| |
435 | 452 |
| |
436 |
| - | |
| 453 | + | |
437 | 454 |
| |
438 |
| - | |
439 |
| - | |
440 |
| - | |
441 |
| - | |
442 |
| - | |
443 |
| - | |
444 |
| - | |
445 |
| - | |
446 |
| - | |
447 |
| - | |
448 |
| - | |
449 |
| - | |
| 455 | + | |
450 | 456 |
| |
451 | 457 |
| |
452 | 458 |
| |
| 459 | + | |
| 460 | + | |
| 461 | + | |
453 | 462 |
| |
454 | 463 |
| |
455 | 464 |
| |
| |||
1311 | 1320 |
| |
1312 | 1321 |
| |
1313 | 1322 |
| |
1314 |
| - | |
1315 |
| - | |
1316 |
| - | |
1317 |
| - | |
1318 |
| - | |
1319 |
| - | |
1320 |
| - | |
1321 |
| - | |
1322 |
| - | |
1323 |
| - | |
1324 |
| - | |
1325 |
| - | |
1326 |
| - | |
1327 |
| - | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1328 | 1338 |
| |
1329 | 1339 |
|
Lines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
47 | 48 |
| |
48 | 49 |
| |
49 | 50 |
| |
| |||
312 | 313 |
| |
313 | 314 |
| |
314 | 315 |
| |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
315 | 327 |
| |
316 | 328 |
| |
317 | 329 |
| |
| |||
530 | 542 |
| |
531 | 543 |
| |
532 | 544 |
| |
533 |
| - | |
| 545 | + | |
534 | 546 |
| |
535 | 547 |
| |
536 | 548 |
| |
| |||
561 | 573 |
| |
562 | 574 |
| |
563 | 575 |
| |
| 576 | + | |
| 577 | + | |
| 578 | + | |
564 | 579 |
| |
565 | 580 |
| |
566 | 581 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
467 | 467 |
| |
468 | 468 |
| |
469 | 469 |
| |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
470 | 477 |
| |
471 | 478 |
| |
472 | 479 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
| 218 | + | |
218 | 219 |
| |
219 | 220 |
| |
220 | 221 |
| |
|
0 commit comments
Comments
(0)