Re: pgsql: Add 'basebackup_to_shell' contrib module.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pgsql: Add 'basebackup_to_shell' contrib module.
Дата
Msg-id CA+TgmobK9EEyPpVuBs7UL_1wHkgAbFdnAkrFox6h_0-5i7HM2A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add 'basebackup_to_shell' contrib module.  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: Add 'basebackup_to_shell' contrib module.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Mar 30, 2022 at 12:54 PM Andres Freund <andres@anarazel.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dagfinn Ilmari Mannsåker
Дата:
Сообщение: Re: multithreaded zstd backup compression for client and server
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Add 'basebackup_to_shell' contrib module.