Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace
Date
Msg-id CAB7nPqQs9L8EyAujLmGkoFdEF5Ev5FPhx7x6iFjyuHb51++rqw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace
List pgsql-hackers
On Fri, Sep 29, 2017 at 2:19 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> It would practically work but I don't like the fact that the
> patch relies on the specific directory/file ordering in the tar
> stream. This is not about the CATVER directory but lower
> directories. Being more strict, it actually makes excessive calls
> to verify_dir_is_em..() for more lower directories contrarily to
> expectations.
>
> I think that we can take more more robust way to detect the
> CATVER directory. Just checking if it is a top-level directory
> will work. That is, making the following change.

My tendency about this patch is still that it should be rejected. This
is presenting additional handling for no real gain.

>
> -   if (firstfile && !basetablespace)
> +   /* copybuf must contain at least one '/' here */
> +   if (!basetablespace && strchr(copybuf, '/')[1] == 0)
>
> This condition exactly hits only CATVER directories not being
> disturbed by file ordering of the tar stream.

Anyway, as a new version is at least needed, I am marking it as
returned with feedback. The CF is close to its end.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Next
From: Albe Laurenz
Date:
Subject: Re: [HACKERS] Enhancements to passwordcheck