Hi,
At Mon, 15 May 2017 14:35:20 +0900, Michael Paquier <michael.paquier@gmail.com> wrote in
<CAB7nPqTfsNW3920KOY62NGj761wE3BTeE1OMQNrBKndR1mL2nQ@mail.gmail.com>
> On Thu, May 11, 2017 at 1:09 PM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> > If we can accept multiple server versions share a tablespace
> > directory, pg_basebackup also can allow that situation. The
> > attached patch does that. Similary to the server code, it
> > correctly fails if the same version subdirectory exists.
>
> +#define verify_dir_is_empty_or_create(dirname, created, found) \
> + verify_and_create_dir(dirname, created, found, false)
> This solution looks like a quick-and-dirty fix. I tend to prefer a
You're right, it just intends to reduce the amount of
modification to clarify what the patch does is. It is to be
replced with the bare functions.
> solution close to whet Pierre is proposing on the other thread by
> localizing things in ReceiveAndUnpackTarFile(). This makes the check
> more localized, and there is no need to complicate low-level APIs of
> pg_basebackup.c.
>
> By the way, it may be better to keep discussions on the first thread created:
> https://www.postgresql.org/message-id/05c62730-8670-4da6-b783-52e66fb42232@pinaraf.info
> A patch has been submitted to the next CF there as well.
I noticed it after the mail upthread. I have sent a comment on
that and moved to the thread. Thanks for noticing.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center