From: David Steele <david@pgmasters.net>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Fix pg_basebackup with in-place tablespaces.
Date: Wed, 16 Mar 2022 15:09:46 -0600
Message-ID: <b6d6996b-b912-b001-a633-ee4c0aeb7f0f@pgmasters.net> (raw)
In-Reply-To: <CA+hUKGLsrH5agnfDgwKvO_2joenRpyizf3vCj4mGZYHCd1dEkw@mail.gmail.com>
References: <66373991-e520-40c1-f1e8-c758c7b24cb7@pgmasters.net>
<428075.1647379703@sss.pgh.pa.us>
<CA+hUKG+sAx4edyX3290QmjBmKAwKcg1GOam50yqXwiVSMQowzg@mail.gmail.com>
<20220316.144216.300331926466543986.horikyota.ntt@gmail.com>
<8893318e-5778-ebf4-71b0-afb210d71a52@pgmasters.net>
<CA+hUKGLsrH5agnfDgwKvO_2joenRpyizf3vCj4mGZYHCd1dEkw@mail.gmail.com>
On 3/16/22 13:33, Thomas Munro wrote:
>
>> It seems that the warning at line 8313 is essentially dead code now. I
>> don't expect test code to have an impact on production systems, even if
>> the effect is minor.
>
> It's not dead, it's how we'd report something like EACCES or EIO. Why
> we only warn and press on, I'm not sure. (I'm also looking into why
> we ignore OS errors for pgwin32_is_junction everywhere.)
I'm also wondering why this is only a warning.
>> I'm less worried about what happens when the flag is flipped on then off
>> because that's not likely to happen in production.
>
> So, concretely, if there is a non-symlink with a name that looks like
> an OID under pg_tblspc, previously we'd barf (or apparently press on
> with an empty pathname on Windows, which might indicate a lack of
> error checking somewhere). Given the policy of quietly ignoring
> anything else in the directory, is it really this code's job to sanity
> check the cluster layout? Hmm, I guess we could fix the problem on
> Windows in a different way so that it behaves like Unix, and then
> revert this. You'd get an ignorable not-a-symlink warning as before
> (and now it'd work on Windows) when backing up in-place tablespaces,
> but I'm not sure it's really an improvement.
I'm not going to press on this, but FWIW this solution sounds better to
me. Either way it is a behavioral change. Windows used to error in this
case and now it does not, Unix used to warn in this case and now it does
not.
For my 2C I'd rather this was a hard error because that makes life a lot
easier down the line. But, that's certainly not the responsibility of
this patch.
Regards,
-David
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: david@pgmasters.net, thomas.munro@gmail.com, horikyota.ntt@gmail.com, tgl@sss.pgh.pa.us, tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix pg_basebackup with in-place tablespaces.
In-Reply-To: <b6d6996b-b912-b001-a633-ee4c0aeb7f0f@pgmasters.net>
* 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