Re: pg_basebackup test coverage

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup test coverage
Date: 2020-12-12 04:27:11
Message-ID: 20201212042711.GB1996095@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 11, 2020 at 12:23:10PM -0500, Robert Haas wrote:
> On Fri, Dec 11, 2020 at 3:04 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > Why don't you just use Archive::Tar [1] instead of looking for some system
> > commands? Combining list_files() with extract(), it is possible to
> > extract an archive, with or without compression, without hoping for an
> > equivalent to exist on Windows. That would not be the first time
> > either that there is a TAP test that skips some tests if a module does
> > not exist. See for example what psql does with IO::Pty.
>
> Well, either this or Noah's method has the disadvantage that not
> everyone will get the benefit of the tests, and that those who wish to
> get that benefit must install more stuff. But, all three of the
> computers I have within arm's reach (yeah, I might have a problem)
> have Archive::Tar installed, so maybe it's not a big concern in
> practice. I am slightly inclined to think that the perl package
> approach might be better than shell commands because perhaps it is
> more likely to work on Windows, but I'm not positive.

Outside Windows, Archive::Tar is less portable. For example, in the forty-two
systems of the GCC Compile Farm, five lack Archive::Tar. (Each of those five
is a CentOS 7 system. Every system does have tar, gzip and gunzip.)

Either way is fine with me. Favoring Archive::Tar, a Windows-specific bug is
more likely than a CentOS/RHEL-specific bug. Favoring shell commands, they
can catch PostgreSQL writing a tar file that the system's tar can't expand.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2020-12-12 06:05:42 Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Previous Message Tom Lane 2020-12-12 03:16:26 Re: Rethinking plpgsql's assignment implementation