forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3500ccc
committed
Support base backup targets.
pg_basebackup now has a --target=TARGET[:DETAIL] option. If specfied,it is sent to the server as the value of the TARGET option to theBASE_BACKUP command. If DETAIL is included, it is sent as the value ofthe new TARGET_DETAIL option to the BASE_BACKUP command. If thetarget is anything other than 'client', pg_basebackup assumes that itwill now be the server's job to write the backup in a location somehowdefined by the target, and that it therefore needs to write nothinglocally. However, the server will still send messages to the clientfor progress reporting purposes.On the server side, we now support two additional types of backuptargets. There is a 'blackhole' target, which just throws away thebackup data without doing anything at all with it. Naturally, thisshould only be used for testing and debugging purposes, since you willnot actually have a backup when it finishes running. More usefully,there is also a 'server' target, so you can now use something like'pg_basebackup -Xnone -t server:/SOME/PATH' to write a backup to somelocation on the server. We can extend this to more types of targetsin the future, and might even want to create an extensibilitymechanism for adding new target types.Since WAL fetching is handled with separate client-side logic, it'snot part of this mechanism; thus, backups with non-default targetsmust use -Xnone or -Xfetch.Patch by me, with a bug fix by Jeevan Ladhe. The patch set of whichthis is a part has also had review and/or testing from Tushar Ahuja,Suraj Kharage, Dipesh Pandit, and Mark Dilger.Discussion:http://postgr.es/m/CA+TgmoaYZbz0=Yk797aOJwkGJC-LK3iXn+wzzMx7KdwNpZhS5g@mail.gmail.com1 parentf80900b commit3500ccc
File tree
11 files changed
+677
-64
lines changed- doc/src/sgml
- ref
- src
- backend
- replication
- utils/activity
- bin/pg_basebackup
- t
- include
- replication
- utils
11 files changed
+677
-64
lines changedLines changed: 21 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2640 | 2640 |
| |
2641 | 2641 |
| |
2642 | 2642 |
| |
2643 |
| - | |
2644 |
| - | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
2645 | 2664 |
| |
2646 | 2665 |
| |
2647 | 2666 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
227 | 257 |
| |
228 | 258 |
| |
229 | 259 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
|
Lines changed: 68 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
58 | 59 |
| |
59 |
| - | |
| 60 | + | |
| 61 | + | |
60 | 62 |
| |
61 | 63 |
| |
62 | 64 |
| |
| |||
69 | 71 |
| |
70 | 72 |
| |
71 | 73 |
| |
| 74 | + | |
72 | 75 |
| |
73 | 76 |
| |
74 | 77 |
| |
| |||
702 | 705 |
| |
703 | 706 |
| |
704 | 707 |
| |
| 708 | + | |
| 709 | + | |
705 | 710 |
| |
706 | 711 |
| |
707 | 712 |
| |
| |||
847 | 852 |
| |
848 | 853 |
| |
849 | 854 |
| |
850 |
| - | |
| 855 | + | |
851 | 856 |
| |
852 | 857 |
| |
853 | 858 |
| |
854 | 859 |
| |
855 | 860 |
| |
856 |
| - | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
857 | 864 |
| |
| 865 | + | |
| 866 | + | |
858 | 867 |
| |
859 | 868 |
| |
860 | 869 |
| |
861 |
| - | |
| 870 | + | |
862 | 871 |
| |
863 | 872 |
| |
864 |
| - | |
865 |
| - | |
866 |
| - | |
867 |
| - | |
868 |
| - | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
869 | 884 |
| |
870 | 885 |
| |
871 | 886 |
| |
| |||
877 | 892 |
| |
878 | 893 |
| |
879 | 894 |
| |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
880 | 911 |
| |
881 | 912 |
| |
882 | 913 |
| |
| |||
908 | 939 |
| |
909 | 940 |
| |
910 | 941 |
| |
911 |
| - | |
912 |
| - | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
913 | 948 |
| |
914 |
| - | |
915 |
| - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
916 | 953 |
| |
917 | 954 |
| |
918 | 955 |
| |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
919 | 974 |
| |
920 | 975 |
| |
921 | 976 |
| |
|
Lines changed: 16 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 |
| |
48 | 51 |
| |
49 | 52 |
| |
| |||
131 | 134 |
| |
132 | 135 |
| |
133 | 136 |
| |
134 |
| - | |
| 137 | + | |
135 | 138 |
| |
136 | 139 |
| |
137 | 140 |
| |
138 | 141 |
| |
| 142 | + | |
139 | 143 |
| |
140 | 144 |
| |
141 | 145 |
| |
| |||
212 | 216 |
| |
213 | 217 |
| |
214 | 218 |
| |
215 |
| - | |
216 |
| - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
217 | 225 |
| |
218 | 226 |
| |
219 | 227 |
| |
| |||
294 | 302 |
| |
295 | 303 |
| |
296 | 304 |
| |
297 |
| - | |
298 |
| - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
299 | 310 |
| |
300 | 311 |
| |
301 | 312 |
| |
|
0 commit comments
Comments
(0)