pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [RFC] building postgres with meson -v9
Date: Thu, 7 Jul 2022 12:09:32 +0200
Message-ID: <ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com> (raw)
In-Reply-To: <20220706132126.2zwx7nzgz73xf5yf@awork3.anarazel.de>
References: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de>
	<20220701093312.phiokhpoqaftuer5@alap3.anarazel.de>
	<0e81e45c-c9a5-e95b-2782-ab2dfec8bf57@enterprisedb.com>
	<20220706132126.2zwx7nzgz73xf5yf@awork3.anarazel.de>

On 06.07.22 15:21, Andres Freund wrote:
>> Here is my rough assessment of where we are with this patch set:
>>
>> 08b4330ded prereq: deal with \ paths in basebackup_to_shell tests.
>>
>> This still needs clarification, per my previous review.
> Hm. I thought I had explained that bit, but apparently not. Well, it's pretty
> simple - without this, the test fail on windows for me, as soon as one of the
> binaries is in a directory with spaces (which is common on windows). Iimagine
> what happens with e.g.
>    qq{$gzip --fast > "$escaped_backup_path\\\\%f.gz"}
> if $gzip contains spaces.
> 
> 
> This doesn't happen currently on CI because nothing runs these tests on
> windows yet.

Hmm, maybe this patch looked different the last time I saw it.  I see 
your point.

The quoting of "$gzip" is clearly necessary.

What about the backslash replacements s{\\}{/}g ?  Is that also required 
for passing the path through the shell?  If so, the treatment of $tar in 
that way doesn't seem necessary, since that doesn't get called through 
an intermediate shell.  (That would then also explain why $gzip in the 
pg_basebackup tests doesn't require that treatment, which had previously 
confused me.)

If my understanding of this is correct, then I suggest:

1. Add a comment to the $gzip =~ s{\\}{/}g ... line.
2. Remove the $tar =~ s{\\}{/}g ... line.
3. Backpatch to PG15.





view thread (10+ messages)  latest in thread

Message-ID: <ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com>
Permalink:  ../ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com/
Also on:    postgresql.org/message-id/ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, andres@anarazel.de
  Subject: Re: [RFC] building postgres with meson -v9
  In-Reply-To: <ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com>
  References: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de> <20220701093312.phiokhpoqaftuer5@alap3.anarazel.de> <0e81e45c-c9a5-e95b-2782-ab2dfec8bf57@enterprisedb.com> <20220706132126.2zwx7nzgz73xf5yf@awork3.anarazel.de> <ce1b6eb3-5736-6f38-9775-b7020128b8d8@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox