• Tom Lane's avatar
    Add end-to-end testing of pg_basebackup's tar-format output. · 081876d7
    Tom Lane authored
    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 being
    meaningfully tested, since that code is used only in the tar-format
    case.  (We do have reasonable coverage of restoring from plain-format
    output, 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 research
    suggests that all non-extinct tar implementations have it.
    Should the buildfarm's opinion differ, we can complicate the
    test a bit to avoid requiring that.
    
    Possibly this should be back-patched, but I'm unsure about
    whether it could work on Windows before d66b23b0.
    081876d7
010_pg_basebackup.pl 20 KB