pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add end-to-end testing of pg_basebackup's tar-format output.
Date: Wed, 17 Mar 2021 20:19:03 +0000
Message-ID: <E1lMcdD-0007vW-L6@gemulon.postgresql.org> (raw)

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 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 d66b23b03.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/081876d75ea15c3bd2ee5ba64a794fd8ea46d794

Modified Files
--------------
src/bin/pg_basebackup/Makefile               |  3 ++
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 55 ++++++++++++++++++++++++----
src/test/perl/PostgresNode.pm                | 34 ++++++++++++++---
3 files changed, 78 insertions(+), 14 deletions(-)



Message-ID: <E1lMcdD-0007vW-L6@gemulon.postgresql.org>
Permalink:  ../E1lMcdD-0007vW-L6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lMcdD-0007vW-L6@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add end-to-end testing of pg_basebackup's tar-format output.
  In-Reply-To: <E1lMcdD-0007vW-L6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox