Re: pgsql: Check that we have a working tar before trying to use it

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Check that we have a working tar before trying to use it
Date: 2021-12-09 05:47:39
Message-ID: YbGYe483803il3X7@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Dec 08, 2021 at 07:08:56PM -0800, Andres Freund wrote:
> On 2021-12-08 18:46:04 -0800, Andres Freund wrote:
>> On 2021-12-08 21:18:54 -0500, Tom Lane wrote:
>> It's not stable, but afaict all the "instability" can be handled by relying on
>> a system-set environment variable... Referencing it as
>> $ENV{SYSTEMROOT}/system32/tar.exe ought to work? I'll test that approach via
>> CI, but of course that won't verify that it works in all kinds of odd
>> installations.
>
> That worked: https://cirrus-ci.com/task/6302355785252864
> https://github.com/anarazel/postgres/commit/49cf19f160080353da391f177a7d8c28218023bb

Well, I am afraid that this is not a completely stable path. That
would not work here, for one. Could it be possible to use a soft
failure instead? If $ENV{TAR} is defined but the command cannot be
found, what Tom proposed upthread seemed like a good alternative to
me, as of:
https://www.postgresql.org/message-id/3657697.1638980149@sss.pgh.pa.us

If this is switched to a hard requirement for any Windows environment
(I can adapt to the new order), it would be better to document all
that in the section of the docs for Windows and the tests of
vcregress.pl or users could finish with surprising failures.
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-12-09 06:21:05 pgsql: Fix some typos with {a,an}
Previous Message Amit Kapila 2021-12-09 03:40:24 pgsql: Fix double publish of child table's data.