forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita8d0732
committed
Remove manual tracking of file position in pg_dump/pg_backup_custom.c.
We do not really need to track the file position by hand. We werealready relying on ftello() whenever the archive file is seekable,while if it's not seekable we don't need the file position infoanyway because we're not going to be able to re-write the TOC.Moreover, that tracking was buggy since it failed to account forthe effects of fseeko(). Somewhat remarkably, that seems not tohave made for any live bugs up to now. We could fix the oversights,but it seems better to just get rid of the whole error-prone mess.In itself this is merely code cleanup. However, it's necessaryinfrastructure for an upcoming bug-fix patch (because that code*does* need valid file position after fseeko). The bug fixneeds to go back as far as v12; hence, back-patch that far.Discussion:https://postgr.es/m/CALBH9DDuJ+scZc4MEvw5uO-=vRyR2=QF9+Yh=3hPEnKHWfS81A@mail.gmail.com1 parent5da8bf8 commita8d0732
1 file changed
+14
-39
lines changedLines changed: 14 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
74 |
| - | |
75 | 73 |
| |
76 | 74 |
| |
77 | 75 |
| |
78 | 76 |
| |
79 | 77 |
| |
80 |
| - | |
| 78 | + | |
81 | 79 |
| |
82 | 80 |
| |
83 | 81 |
| |
| |||
144 | 142 |
| |
145 | 143 |
| |
146 | 144 |
| |
147 |
| - | |
148 |
| - | |
149 | 145 |
| |
150 | 146 |
| |
151 | 147 |
| |
| |||
185 | 181 |
| |
186 | 182 |
| |
187 | 183 |
| |
188 |
| - | |
189 | 184 |
| |
190 | 185 |
| |
191 | 186 |
| |
| |||
290 | 285 |
| |
291 | 286 |
| |
292 | 287 |
| |
293 |
| - | |
| 288 | + | |
| 289 | + | |
294 | 290 |
| |
295 | 291 |
| |
296 | 292 |
| |
| |||
350 | 346 |
| |
351 | 347 |
| |
352 | 348 |
| |
353 |
| - | |
| 349 | + | |
| 350 | + | |
354 | 351 |
| |
355 | 352 |
| |
356 | 353 |
| |
| |||
551 | 548 |
| |
552 | 549 |
| |
553 | 550 |
| |
554 |
| - | |
555 | 551 |
| |
556 | 552 |
| |
557 | 553 |
| |
| |||
575 | 571 |
| |
576 | 572 |
| |
577 | 573 |
| |
578 |
| - | |
579 |
| - | |
580 | 574 |
| |
581 | 575 |
| |
582 | 576 |
| |
| |||
594 | 588 |
| |
595 | 589 |
| |
596 | 590 |
| |
597 |
| - | |
598 | 591 |
| |
599 | 592 |
| |
600 | 593 |
| |
601 | 594 |
| |
602 |
| - | |
603 | 595 |
| |
604 | 596 |
| |
605 | 597 |
| |
| |||
615 | 607 |
| |
616 | 608 |
| |
617 | 609 |
| |
618 |
| - | |
619 | 610 |
| |
620 | 611 |
| |
621 | 612 |
| |
622 | 613 |
| |
623 | 614 |
| |
624 |
| - | |
625 | 615 |
| |
626 | 616 |
| |
627 | 617 |
| |
| |||
635 | 625 |
| |
636 | 626 |
| |
637 | 627 |
| |
638 |
| - | |
639 |
| - | |
640 | 628 |
| |
641 | 629 |
| |
642 |
| - | |
643 | 630 |
| |
644 | 631 |
| |
645 | 632 |
| |
| |||
652 | 639 |
| |
653 | 640 |
| |
654 | 641 |
| |
655 |
| - | |
656 |
| - | |
657 | 642 |
| |
658 | 643 |
| |
659 |
| - | |
660 | 644 |
| |
661 | 645 |
| |
662 | 646 |
| |
| |||
688 | 672 |
| |
689 | 673 |
| |
690 | 674 |
| |
691 |
| - | |
692 | 675 |
| |
693 | 676 |
| |
694 | 677 |
| |
| |||
862 | 845 |
| |
863 | 846 |
| |
864 | 847 |
| |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
865 | 853 |
| |
866 | 854 |
| |
867 | 855 |
| |
868 | 856 |
| |
869 | 857 |
| |
870 | 858 |
| |
871 |
| - | |
| 859 | + | |
| 860 | + | |
872 | 861 |
| |
873 |
| - | |
874 |
| - | |
875 |
| - | |
876 |
| - | |
877 |
| - | |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
| 862 | + | |
| 863 | + | |
882 | 864 |
| |
883 |
| - | |
884 |
| - | |
885 |
| - | |
886 | 865 |
| |
887 |
| - | |
888 |
| - | |
889 | 866 |
| |
890 | 867 |
| |
891 | 868 |
| |
| |||
897 | 874 |
| |
898 | 875 |
| |
899 | 876 |
| |
900 |
| - | |
901 | 877 |
| |
902 | 878 |
| |
903 | 879 |
| |
| |||
918 | 894 |
| |
919 | 895 |
| |
920 | 896 |
| |
921 |
| - | |
922 | 897 |
| |
923 | 898 |
| |
924 | 899 |
| |
|
0 commit comments
Comments
(0)