Re: Prevent pg_basebackup -Fp -D -? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Prevent pg_basebackup -Fp -D -?
Date
Msg-id CAB7nPqQRDr8RuFAK+AFh0FtHk2JXYD1jndm=-sp4EEGDuUrbRA@mail.gmail.com
Whole thread Raw
In response to Prevent pg_basebackup -Fp -D -?  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Prevent pg_basebackup -Fp -D -?  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Wed, Oct 2, 2013 at 11:31 PM, Magnus Hagander <magnus@hagander.net> wrote:
> Right now, if you use
>
> pg_basebackup -Ft -D -
>
> you get a tarfile, written to stdout, for redirection.
>
> However, if you use:
>
> pg_basebackup -Fp -D -
>
> you get a plaintext (unpackaged) backup, in a directory called "-".
>
> I can't think of a single usecase where this is a good idea. Therefor,
> I would suggest we simply throw an error in this case, instead of
> creating the directory. Only for the specific case of specifying
> exactly "-" as a directory.
>
> Comments?
Isn't this a non-problem? This behavior is in line with the
documentation, so I would suspected that if directory name is
specified as "-" in plain mode, it should create the folder with this
name.
Do you consider having a folder of this name an annoyance?

> Also, if we do that, is this something we should consider
> backpatchable? It's not strictly speaking a bugfix, but I'd say it
> fixes some seriously annoying behavior.
This would change the spec of pg_basebackup, so no? Does the current
behavior have potential security issues?

My 2c. Regards,
-- 
Michael



pgsql-hackers by date:

Previous
From: KONDO Mitsumasa
Date:
Subject: Re: Who is pgFoundery administrator?
Next
From: Josh Berkus
Date:
Subject: Re: Prevent pg_basebackup -Fp -D -?