forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5a1007a
committed
Have the server properly terminate tar archives.
Earlier versions of PostgreSQL featured a version of pg_basebackupthat wanted to edit tar archives but was too dumb to parse themproperly. The server made things easier for the client by failingto add the two blocks of zero bytes that ought to end a tar file,leaving it up to the client to do that.But since commit23a1c65, wedon't need this hack any more, because pg_basebackup is now smarterand can parse tar files even if they are properly terminated! Sochange the server to always properly terminate the tar files. Olderversions of pg_basebackup can't talk to new servers anyway, sothere's no compatibility break.On the pg_basebackup side, we see still need to add the terminatingzero bytes if we're talking to an older server, but not when theserver is v15+. Hopefully at some point we'll be able to removesome of this compatibility cruft, but it seems best to hang on toit for now.In passing, add a file header comment to bbstreamer_tar.c, to makeit clearer what's going on here.Discussion:http://postgr.es/m/CA+TgmoZbNzsWwM4BE5Jb_qHncY817DYZwGf+2-7hkMQ27ZwsMQ@mail.gmail.com1 parentee3a1a5 commit5a1007a
File tree
3 files changed
+45
-6
lines changed- src
- backend/replication
- bin/pg_basebackup
3 files changed
+45
-6
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
377 | 385 |
| |
| 386 | + | |
378 | 387 |
| |
379 | 388 |
| |
380 | 389 |
| |
| |||
611 | 620 |
| |
612 | 621 |
| |
613 | 622 |
| |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
614 | 630 |
| |
615 | 631 |
| |
616 | 632 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 |
| |
6 | 16 |
| |
7 | 17 |
| |
|
Lines changed: 19 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
88 | 94 |
| |
89 | 95 |
| |
90 | 96 |
| |
| |||
166 | 172 |
| |
167 | 173 |
| |
168 | 174 |
| |
169 |
| - | |
| 175 | + | |
| 176 | + | |
170 | 177 |
| |
171 | 178 |
| |
172 | 179 |
| |
| |||
965 | 972 |
| |
966 | 973 |
| |
967 | 974 |
| |
968 |
| - | |
| 975 | + | |
| 976 | + | |
969 | 977 |
| |
970 | 978 |
| |
971 | 979 |
| |
| |||
1074 | 1082 |
| |
1075 | 1083 |
| |
1076 | 1084 |
| |
1077 |
| - | |
1078 |
| - | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1079 | 1088 |
| |
1080 | 1089 |
| |
1081 | 1090 |
| |
1082 |
| - | |
| 1091 | + | |
1083 | 1092 |
| |
1084 | 1093 |
| |
1085 | 1094 |
| |
| |||
1099 | 1108 |
| |
1100 | 1109 |
| |
1101 | 1110 |
| |
| 1111 | + | |
1102 | 1112 |
| |
1103 | 1113 |
| |
1104 | 1114 |
| |
1105 | 1115 |
| |
1106 | 1116 |
| |
| 1117 | + | |
| 1118 | + | |
1107 | 1119 |
| |
1108 | 1120 |
| |
1109 |
| - | |
| 1121 | + | |
| 1122 | + | |
1110 | 1123 |
| |
1111 | 1124 |
| |
1112 | 1125 |
| |
|
0 commit comments
Comments
(0)