forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0b1765d
committed
pg_combinebackup: Error if incremental file exists in full backup.
Suppose that you run a command like "pg_combinebackup b1 b2 -o output",but both b1 and b2 contain an INCREMENTAL.$something file in a directorythat is expected to contain relation files. This is an error, but theprevious code would not detect the problem and instead write a garbagefull file named $something to the output directory. This commit addscode to detect the error and a test case to verify the behavior.It's difficult to imagine that this will ever happen unless someoneis intentionally trying to break incremental backup, but per discussion,let's consider that the lack of adequate sanity checking in this area isa bug and back-patch to v17, where incremental backup was introduced.Patch by me, reviewed by Bertrand Drouvot and Amul Sul.Discussion:http://postgr.es/m/CA+TgmoaD7dBYPqe7kMtO0dyto7rd0rUh7joh=JPUSaFszKY6Pg@mail.gmail.com1 parent6c24801 commit0b1765d
File tree
3 files changed
+75
-0
lines changed- src/bin/pg_combinebackup
- t
3 files changed
+75
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
| 329 | + | |
| 330 | + | |
| 331 | + | |
329 | 332 |
| |
330 | 333 |
| |
331 | 334 |
| |
332 | 335 |
| |
333 | 336 |
| |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
334 | 342 |
| |
335 | 343 |
| |
336 | 344 |
| |
|
Lines changed: 66 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + |
0 commit comments
Comments
(0)