Re: Duplicate usage of tablespace location?

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: michael(dot)paquier(at)gmail(dot)com
Cc: nehakhatri5(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Duplicate usage of tablespace location?
Date: 2017-05-16 03:50:22
Message-ID: 20170516.125022.227675862.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

At Mon, 15 May 2017 14:35:20 +0900, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote in <CAB7nPqTfsNW3920KOY62NGj761wE3BTeE1OMQNrBKndR1mL2nQ(at)mail(dot)gmail(dot)com>
> On Thu, May 11, 2017 at 1:09 PM, Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2017-05-16 04:19:01 Re: CTE inlining
Previous Message Ashutosh Bapat 2017-05-16 03:45:43 Re: [POC] hash partitioning