forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit00cdd83
committed
Adopt the GNU convention for handling tar-archive members exceeding 8GB.
The POSIX standard for tar headers requires archive member sizes to beprinted in octal with at most 11 digits, limiting the representable filesize to 8GB. However, GNU tar and apparently most other modern tarssupport a convention in which oversized values can be stored in base-256,allowing any practical file to be a tar member. Adopt this conventionto remove two limitations:* pg_dump with -Ft output format failed if the contents of any one tableexceeded 8GB.* pg_basebackup failed if the data directory contained any file exceeding8GB. (This would be a fatal problem for installations configured with atable segment size of 8GB or more, and it has also been seen to fail whenlarge core dump files exist in the data directory.)File sizes under 8GB are still printed in octal, so that no compatibilityissues are created except in cases that would have failed entirely before.In addition, this patch fixes several bugs in the same area:* In 9.3 and later, we'd defined tarCreateHeader's file-size argument assize_t, which meant that on 32-bit machines it would write a corrupt tarheader for file sizes between 4GB and 8GB, even though no error was raised.This broke both "pg_dump -Ft" and pg_basebackup for such cases.* pg_restore from a tar archive would fail on tables of size between 4GBand 8GB, on machines where either "size_t" or "unsigned long" is 32 bits.This happened even with an archive file not affected by the previous bug.* pg_basebackup would fail if there were files of size between 4GB and 8GB,even on 64-bit machines.* In 9.3 and later, "pg_basebackup -Ft" failed entirely, for any file size,on 64-bit big-endian machines.In view of these potential data-loss bugs, back-patch to all supportedbranches, even though removal of the documented 8GB limit might otherwisebe considered a new feature rather than a bug fix.1 parent074c5cf commit00cdd83
File tree
6 files changed
+125
-116
lines changed- doc/src/sgml/ref
- src
- backend/replication
- bin
- pg_basebackup
- pg_dump
- include
- port
6 files changed
+125
-116
lines changedLines changed: 5 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
276 |
| - | |
| 275 | + | |
| 276 | + | |
277 | 277 |
| |
278 |
| - | |
279 |
| - | |
280 |
| - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
| |||
1140 | 1140 |
| |
1141 | 1141 |
| |
1142 | 1142 |
| |
1143 |
| - | |
1144 |
| - | |
1145 |
| - | |
1146 |
| - | |
1147 |
| - | |
1148 |
| - | |
1149 |
| - | |
1150 |
| - | |
1151 |
| - | |
1152 | 1143 |
| |
1153 | 1144 |
| |
1154 | 1145 |
| |
|
Lines changed: 1 addition & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
698 | 698 |
| |
699 | 699 |
| |
700 | 700 |
| |
701 |
| - | |
| 701 | + | |
702 | 702 |
| |
703 | 703 |
| |
704 | 704 |
| |
| |||
1131 | 1131 |
| |
1132 | 1132 |
| |
1133 | 1133 |
| |
1134 |
| - | |
1135 |
| - | |
1136 |
| - | |
1137 |
| - | |
1138 |
| - | |
1139 |
| - | |
1140 |
| - | |
1141 | 1134 |
| |
1142 | 1135 |
| |
1143 | 1136 |
| |
| |||
1166 | 1159 |
| |
1167 | 1160 |
| |
1168 | 1161 |
| |
1169 |
| - | |
1170 |
| - | |
1171 |
| - | |
1172 |
| - | |
1173 |
| - | |
1174 |
| - | |
1175 |
| - | |
1176 |
| - | |
1177 |
| - | |
1178 | 1162 |
| |
1179 | 1163 |
| |
1180 | 1164 |
| |
|
Lines changed: 6 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
781 | 781 |
| |
782 | 782 |
| |
783 | 783 |
| |
784 |
| - | |
| 784 | + | |
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
| |||
1046 | 1046 |
| |
1047 | 1047 |
| |
1048 | 1048 |
| |
1049 |
| - | |
| 1049 | + | |
1050 | 1050 |
| |
1051 | 1051 |
| |
1052 | 1052 |
| |
| |||
1139 | 1139 |
| |
1140 | 1140 |
| |
1141 | 1141 |
| |
1142 |
| - | |
| 1142 | + | |
1143 | 1143 |
| |
1144 | 1144 |
| |
1145 | 1145 |
| |
| |||
1208 | 1208 |
| |
1209 | 1209 |
| |
1210 | 1210 |
| |
1211 |
| - | |
1212 |
| - | |
1213 |
| - | |
1214 |
| - | |
1215 |
| - | |
1216 |
| - | |
| 1211 | + | |
1217 | 1212 |
| |
1218 | 1213 |
| |
1219 |
| - | |
1220 |
| - | |
1221 |
| - | |
1222 |
| - | |
1223 |
| - | |
1224 |
| - | |
| 1214 | + | |
1225 | 1215 |
| |
1226 | 1216 |
| |
1227 | 1217 |
| |
| |||
2180 | 2170 |
| |
2181 | 2171 |
| |
2182 | 2172 |
| |
2183 |
| - | |
| 2173 | + | |
2184 | 2174 |
| |
2185 | 2175 |
| |
2186 | 2176 |
| |
|
Lines changed: 20 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 | 81 |
| |
89 | 82 |
| |
90 | 83 |
| |
| |||
1049 | 1042 |
| |
1050 | 1043 |
| |
1051 | 1044 |
| |
1052 |
| - | |
| 1045 | + | |
1053 | 1046 |
| |
1054 | 1047 |
| |
1055 | 1048 |
| |
| |||
1091 | 1084 |
| |
1092 | 1085 |
| |
1093 | 1086 |
| |
1094 |
| - | |
1095 |
| - | |
1096 |
| - | |
1097 |
| - | |
1098 |
| - | |
1099 |
| - | |
1100 |
| - | |
1101 | 1087 |
| |
1102 | 1088 |
| |
1103 | 1089 |
| |
| |||
1222 | 1208 |
| |
1223 | 1209 |
| |
1224 | 1210 |
| |
1225 |
| - | |
| 1211 | + | |
1226 | 1212 |
| |
1227 | 1213 |
| |
1228 |
| - | |
1229 |
| - | |
| 1214 | + | |
1230 | 1215 |
| |
1231 | 1216 |
| |
1232 | 1217 |
| |
| |||
1249 | 1234 |
| |
1250 | 1235 |
| |
1251 | 1236 |
| |
1252 |
| - | |
| 1237 | + | |
1253 | 1238 |
| |
1254 | 1239 |
| |
1255 | 1240 |
| |
| |||
1272 | 1257 |
| |
1273 | 1258 |
| |
1274 | 1259 |
| |
1275 |
| - | |
1276 |
| - | |
1277 |
| - | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1278 | 1264 |
| |
1279 | 1265 |
| |
1280 |
| - | |
| 1266 | + | |
| 1267 | + | |
1281 | 1268 |
| |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1285 | 1273 |
| |
1286 | 1274 |
| |
1287 | 1275 |
| |
1288 | 1276 |
| |
1289 |
| - | |
| 1277 | + | |
1290 | 1278 |
| |
1291 |
| - | |
| 1279 | + | |
| 1280 | + | |
1292 | 1281 |
| |
1293 | 1282 |
| |
1294 | 1283 |
| |
1295 |
| - | |
| 1284 | + | |
1296 | 1285 |
| |
1297 | 1286 |
| |
1298 | 1287 |
| |
| |||
1307 | 1296 |
| |
1308 | 1297 |
| |
1309 | 1298 |
| |
1310 |
| - | |
| 1299 | + | |
| 1300 | + | |
1311 | 1301 |
| |
1312 | 1302 |
| |
1313 | 1303 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 |
|
0 commit comments
Comments
(0)