forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9f44d71
committed
Fix printing last progress report line in client programs.
A number of client programs have a "--progress" option that when printingto a TTY, updates the current line by printing a '\r' and overwriting it.After the last line, '\n' needs to be printed to move the cursor to thenext line. pg_basebackup and pgbench got this right, but pg_rewind andpg_checksums were slightly wrong. pg_rewind printed the newline to stdoutinstead of stderr, and pg_checksums printed the newline even when notprinting to a TTY. Fix them, and also add a 'finished' argument topg_basebackup's progress_report() function, to keep it consistent withthe other programs.Backpatch to v12. pg_rewind's newline was broken with the logging changesin commitcc8d415 in v12, and pg_checksums was introduced in v12.Discussion:https://www.postgresql.org/message-id/82b539e5-ae33-34b0-1aee-22b3379fd3eb@iki.fi1 parent29bd2cb commit9f44d71
File tree
4 files changed
+41
-35
lines changed- src/bin
- pg_basebackup
- pg_checksums
- pg_rewind
4 files changed
+41
-35
lines changedLines changed: 20 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
| 146 | + | |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| |||
706 | 707 |
| |
707 | 708 |
| |
708 | 709 |
| |
709 |
| - | |
710 |
| - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
711 | 715 |
| |
712 | 716 |
| |
713 |
| - | |
| 717 | + | |
| 718 | + | |
714 | 719 |
| |
715 | 720 |
| |
716 | 721 |
| |
| |||
721 | 726 |
| |
722 | 727 |
| |
723 | 728 |
| |
724 |
| - | |
| 729 | + | |
725 | 730 |
| |
726 | 731 |
| |
727 | 732 |
| |
| |||
792 | 797 |
| |
793 | 798 |
| |
794 | 799 |
| |
795 |
| - | |
796 |
| - | |
797 |
| - | |
798 |
| - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
799 | 805 |
| |
800 | 806 |
| |
801 | 807 |
| |
| |||
1355 | 1361 |
| |
1356 | 1362 |
| |
1357 | 1363 |
| |
1358 |
| - | |
| 1364 | + | |
1359 | 1365 |
| |
1360 |
| - | |
| 1366 | + | |
1361 | 1367 |
| |
1362 | 1368 |
| |
1363 | 1369 |
| |
| |||
1614 | 1620 |
| |
1615 | 1621 |
| |
1616 | 1622 |
| |
1617 |
| - | |
| 1623 | + | |
1618 | 1624 |
| |
1619 | 1625 |
| |
1620 | 1626 |
| |
| |||
1630 | 1636 |
| |
1631 | 1637 |
| |
1632 | 1638 |
| |
1633 |
| - | |
| 1639 | + | |
1634 | 1640 |
| |
1635 | 1641 |
| |
1636 | 1642 |
| |
| |||
2011 | 2017 |
| |
2012 | 2018 |
| |
2013 | 2019 |
| |
2014 |
| - | |
2015 |
| - | |
2016 |
| - | |
2017 |
| - | |
2018 |
| - | |
| 2020 | + | |
2019 | 2021 |
| |
2020 | 2022 |
| |
2021 | 2023 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
127 |
| - | |
| 127 | + | |
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 |
| - | |
| 137 | + | |
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
165 |
| - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 |
| |
167 | 170 |
| |
168 | 171 |
| |
| |||
623 | 626 |
| |
624 | 627 |
| |
625 | 628 |
| |
626 |
| - | |
627 | 629 |
| |
628 |
| - | |
629 |
| - | |
630 | 630 |
| |
631 | 631 |
| |
632 | 632 |
| |
|
Lines changed: 13 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
362 |
| - | |
363 | 362 |
| |
364 | 363 |
| |
365 | 364 |
| |
| |||
452 | 451 |
| |
453 | 452 |
| |
454 | 453 |
| |
455 |
| - | |
456 |
| - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
457 | 459 |
| |
458 | 460 |
| |
459 |
| - | |
| 461 | + | |
460 | 462 |
| |
461 | 463 |
| |
462 | 464 |
| |
| |||
468 | 470 |
| |
469 | 471 |
| |
470 | 472 |
| |
471 |
| - | |
| 473 | + | |
472 | 474 |
| |
473 | 475 |
| |
474 | 476 |
| |
| |||
498 | 500 |
| |
499 | 501 |
| |
500 | 502 |
| |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
505 | 509 |
| |
506 | 510 |
| |
507 | 511 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
|
0 commit comments
Comments
(0)