From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: pgsql: Add 'basebackup_to_shell' contrib module. |
Date: | 2022-03-30 17:04:21 |
Message-ID: | CA+TgmobK9EEyPpVuBs7UL_1wHkgAbFdnAkrFox6h_0-5i7HM2A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Mar 30, 2022 at 12:54 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> There are some commandline utilities (including copy) where backward slashes
> in arguments are necessary, to separate options from paths :/. Those are the
> extent of backslash use in Cluster.pm that I could see quickly.
I just copied this logic from that file:
$path =~ s{\\}{\\\\}g if ($PostgreSQL::Test::Utils::windows_os);
my $copy_command =
$PostgreSQL::Test::Utils::windows_os
? qq{copy "$path\\\\%f" "%p"}
: qq{cp "$path/%f" "%p"};
In the first version of the patch I neglected the first of those lines
and it broke, so the s{\\}{\\\\}g thing is definitely needed. It's
possible that / would be as good as \\\\ in the command text itself,
but it doesn't seem worth getting excited about. It'd be best if any
unnecessary garbage of this sort got cleaned up by someone who has a
test environment locally, rather than me testing by sending emails to
a mailing list which Thomas then downloads into a sandbox and executes
which you then send me links to what broke on the mailing list and I
try again.
> Fair enough. I found it a bit grating to read in the test, that's why I
> mentioned it...
I'm going to go ahead and commit this test script later on this
afternoon unless there are vigorous objections real soon now, and then
if somebody wants to improve it, great!
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-03-30 17:11:49 | Re: pgsql: Add 'basebackup_to_shell' contrib module. |
Previous Message | Tom Lane | 2022-03-30 16:58:26 | Re: pgsql: Add 'basebackup_to_shell' contrib module. |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-03-30 17:11:49 | Re: pgsql: Add 'basebackup_to_shell' contrib module. |
Previous Message | Dagfinn Ilmari Mannsåker | 2022-03-30 17:00:42 | Re: multithreaded zstd backup compression for client and server |