forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit081876d
committed
Add end-to-end testing of pg_basebackup's tar-format output.
The existing test script does run pg_basebackup with the -Ft option,but it makes no real attempt to verify the sanity of the results.We wouldn't know if the output is incompatible with standard "tar"programs, nor if the server fails to start from the restored output.Notably, this means that xlog.c's read_tablespace_map() is not beingmeaningfully tested, since that code is used only in the tar-formatcase. (We do have reasonable coverage of restoring from plain-formatoutput, though it's over in src/test/recovery not here.)Hence, attempt to untar the output and start a server from it,rather just hoping it's OK.This test assumes that the local "tar" has the "-C directory"switch. Although that's not promised by POSIX, my researchsuggests that all non-extinct tar implementations have it.Should the buildfarm's opinion differ, we can complicate thetest a bit to avoid requiring that.Possibly this should be back-patched, but I'm unsure aboutwhether it could work on Windows befored66b23b.1 parentc783e65 commit081876d
File tree
3 files changed
+78
-14
lines changed- src
- bin/pg_basebackup
- t
- test/perl
3 files changed
+78
-14
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
| |
|
Lines changed: 47 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
| 232 | + | |
232 | 233 |
| |
233 | 234 |
| |
234 | 235 |
| |
| |||
242 | 243 |
| |
243 | 244 |
| |
244 | 245 |
| |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
251 | 257 |
| |
252 |
| - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
253 | 292 |
| |
254 | 293 |
| |
255 | 294 |
| |
|
Lines changed: 28 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
538 | 538 |
| |
539 | 539 |
| |
540 | 540 |
| |
541 |
| - | |
542 |
| - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
543 | 546 |
| |
544 | 547 |
| |
545 | 548 |
| |
| |||
548 | 551 |
| |
549 | 552 |
| |
550 | 553 |
| |
551 |
| - | |
| 554 | + | |
552 | 555 |
| |
553 | 556 |
| |
554 | 557 |
| |
555 | 558 |
| |
556 | 559 |
| |
557 | 560 |
| |
558 | 561 |
| |
559 |
| - | |
| 562 | + | |
| 563 | + | |
560 | 564 |
| |
561 | 565 |
| |
562 | 566 |
| |
| |||
650 | 654 |
| |
651 | 655 |
| |
652 | 656 |
| |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
653 | 662 |
| |
654 | 663 |
| |
655 | 664 |
| |
| |||
687 | 696 |
| |
688 | 697 |
| |
689 | 698 |
| |
690 |
| - | |
691 |
| - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
692 | 714 |
| |
693 | 715 |
| |
694 | 716 |
| |
|
0 commit comments
Comments
(0)