forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcc333f3
committed
Modify pg_basebackup to use a new COPY subprotocol for base backups.
In the new approach, all files across all tablespaces are sent in asingle COPY OUT operation. The CopyData messages are no longer rawarchive content; rather, each message is prefixed with a type bytethat describes its purpose, e.g. 'n' signifies the start of a newarchive and 'd' signifies archive or manifest data. This protocolis significantly more extensible than the old approach, since we canlater create more message types, though not without concern forbackward compatibility.The new protocol sends a few things to the client that the old onedid not. First, it sends the name of each archive explicitly, insteadof letting the client compute it. This is intended to make it easierto write future patches that might send archives in a format otherthat tar (e.g. cpio, pax, tar.gz). Second, it sends explicit progressmessages rather than allowing the client to assume that progress isdefined by the number of bytes received. This will help with futurefeatures where the server compresses the data, or sends it someplacedirectly rather than transmitting it to the client.The old protocol is still supported for compatibility with previousreleases. The new protocol is selected by means of a newTARGET option to the BASE_BACKUP command. Currently, theonly supported target is 'client'. Support for additionaltargets will be added in a later commit.Patch by me. The patch set of which this is a part has had reviewand/or testing from Jeevan Ladhe, Tushar Ahuja, Suraj Kharage,Dipesh Pandit, and Mark Dilger.Discussion:http://postgr.es/m/CA+TgmoaYZbz0=Yk797aOJwkGJC-LK3iXn+wzzMx7KdwNpZhS5g@mail.gmail.com1 parent3414099 commitcc333f3
File tree
5 files changed
+806
-48
lines changed- doc/src/sgml
- src
- backend/replication
- bin/pg_basebackup
- include/replication
5 files changed
+806
-48
lines changedLines changed: 120 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2630 | 2630 |
| |
2631 | 2631 |
| |
2632 | 2632 |
| |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
2633 | 2649 |
| |
2634 | 2650 |
| |
2635 | 2651 |
| |
| |||
2805 | 2821 |
| |
2806 | 2822 |
| |
2807 | 2823 |
| |
2808 |
| - | |
2809 |
| - | |
2810 |
| - | |
2811 |
| - | |
2812 |
| - | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
2813 | 2833 |
| |
2814 | 2834 |
| |
2815 | 2835 |
| |
2816 |
| - | |
2817 |
| - | |
2818 |
| - | |
2819 |
| - | |
2820 |
| - | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2821 | 2931 |
| |
2822 | 2932 |
| |
2823 | 2933 |
| |
|
Lines changed: 34 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 |
| |
57 | 63 |
| |
58 | 64 |
| |
| |||
62 | 68 |
| |
63 | 69 |
| |
64 | 70 |
| |
| 71 | + | |
65 | 72 |
| |
66 | 73 |
| |
67 | 74 |
| |
| |||
694 | 701 |
| |
695 | 702 |
| |
696 | 703 |
| |
| 704 | + | |
697 | 705 |
| |
698 | 706 |
| |
| 707 | + | |
699 | 708 |
| |
700 | 709 |
| |
701 | 710 |
| |
| |||
836 | 845 |
| |
837 | 846 |
| |
838 | 847 |
| |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
839 | 864 |
| |
840 | 865 |
| |
841 | 866 |
| |
| |||
881 | 906 |
| |
882 | 907 |
| |
883 | 908 |
| |
884 |
| - | |
885 |
| - | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
886 | 918 |
| |
887 | 919 |
| |
888 | 920 |
| |
|
0 commit comments
Comments
(0)