forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit23a7835
committed
Error when creating names too long for tar format
The tar format (at least the version we are using), does not supportfile names or symlink targets longer than 99 bytes. Until now, the tarcreation code would silently truncate any names that are too long. (Itsoriginal application was pg_dump, where this never happens.) Thiscreates problems when running base backups over the replicationprotocol.The most important problem is when a tablespace path is longer than 99bytes, which will result in a truncated tablespace path being backed up.Less importantly, the basebackup protocol also promises to back up anyother files it happens to find in the data directory, which would alsolead to file name truncation if someone put a file with a long name inthere.Now both of these cases result in an error during the backup.Add tests that fail when a too-long file name or symlink is attempted tobe backed up.Reviewed-by: Robert Hass <robertmhaas@gmail.com>1 parent347c743 commit23a7835
File tree
4 files changed
+52
-4
lines changed- src
- backend/replication
- bin/pg_basebackup/t
- include
- port
4 files changed
+52
-4
lines changedLines changed: 20 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 | 1260 |
| |
| 1261 | + | |
1261 | 1262 |
| |
1262 |
| - | |
| 1263 | + | |
1263 | 1264 |
| |
1264 | 1265 |
| |
1265 | 1266 |
| |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1266 | 1285 |
| |
1267 | 1286 |
| |
1268 | 1287 |
| |
|
Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
| 5 | + | |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 |
| |
53 | 60 |
| |
54 | 61 |
| |
| |||
117 | 124 |
| |
118 | 125 |
| |
119 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + |
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 |
| |
57 | 63 |
| |
58 | 64 |
| |
| |||
141 | 147 |
| |
142 | 148 |
| |
143 | 149 |
| |
| 150 | + | |
| 151 | + | |
144 | 152 |
|
0 commit comments
Comments
(0)