Re: fairywren is generating bogus BASE_BACKUP commands - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: fairywren is generating bogus BASE_BACKUP commands
Date
Msg-id 7561cedc-113f-b5b5-6231-b3a1755e6331@dunslane.net
Whole thread Raw
In response to Re: fairywren is generating bogus BASE_BACKUP commands  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: fairywren is generating bogus BASE_BACKUP commands
List pgsql-hackers
On 1/21/22 22:43, Thomas Munro wrote:
> On Sat, Jan 22, 2022 at 3:55 PM Robert Haas <robertmhaas@gmail.com> wrote:
>> On Fri, Jan 21, 2022 at 5:35 PM Andrew Dunstan <andrew@dunslane.net> wrote:
>>>     # See https://www.msys2.org/wiki/Porting/#filesystem-namespaces
>>>     local $ENV{MSYS2_ARG_CONV_EXCL} = $source_ts_prefix;
>>> Probably in this case just setting it to 'server:' would do the trick.
>> Oh, thanks for the tip. Do you want to push a commit that does that,
>> or ... should I do it?
> Just a thought:  Would it prevent the magic path translation and all
> just work if the path were already in Windows form?  So, if we did
> just this change at the top:
>
> -my $tempdir = PostgreSQL::Test::Utils::tempdir;
> +my $tempdir = PostgreSQL::Test::Utils::perl2host(PostgreSQL::Test::Utils::tempdir);


It's not as simple as that :-(  But you're on the right track. My
suggestion above doesn't work.

The rule for paths is: when you're passing a path to an external program
that's not msys aware (typically, one of our build artefacts like psql
or pg_basebackup) it needs to be a native path. But when you're passing
it to a perl function (e.g. mkdir) or to an external program that's msys
aware it needs to be a virtual path, i.e. one not mangled by perl2host.

Some recent commits to this file especially have not obeyed this rule.
Here's a patch that does it consistently for the whole file. I have
tested it on a system very like fairywren, and the test passes.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: psql - add SHOW_ALL_RESULTS option
Next
From: "Joel Jacobson"
Date:
Subject: Re: PSA: Autoconf has risen from the dead