Minor improvement for creating directory structure

Started by PG Bug reporting formalmost 7 years ago4 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/install-short.html
Description:

1)
$ mkdir /usr/local/pgsql/data
mkdir: cannot create directory ‘/usr/local/pgsql/data’: No such file or
directory

Suggested correction:
$ mkdir -p /usr/local/pgsql/data
-------------------------
2)
chown -R postgres /usr/local/pgsql

/Jonas

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: Minor improvement for creating directory structure

On Wed, May 8, 2019 at 07:40:16AM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/install-short.html
Description:

1)
$ mkdir /usr/local/pgsql/data
mkdir: cannot create directory ‘/usr/local/pgsql/data’: No such file or
directory

My docs say:

-p, --parents
no error if existing, make parent directories as needed

While I can see the value of "make parent directories as needed", having
it do "no error if existing" could be bad.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#2)
Re: Minor improvement for creating directory structure

On 2019-May-09, Bruce Momjian wrote:

On Wed, May 8, 2019 at 07:40:16AM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/install-short.html
Description:

1)
$ mkdir /usr/local/pgsql/data
mkdir: cannot create directory ‘/usr/local/pgsql/data’: No such file or
directory

My docs say:

-p, --parents
no error if existing, make parent directories as needed

While I can see the value of "make parent directories as needed", having
it do "no error if existing" could be bad.

Why? initdb is going to fail anyway if it contains anything.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#3)
Re: Minor improvement for creating directory structure

On Thu, May 9, 2019 at 05:59:12PM -0400, Alvaro Herrera wrote:

On 2019-May-09, Bruce Momjian wrote:

On Wed, May 8, 2019 at 07:40:16AM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/install-short.html
Description:

1)
$ mkdir /usr/local/pgsql/data
mkdir: cannot create directory ‘/usr/local/pgsql/data’: No such file or
directory

My docs say:

-p, --parents
no error if existing, make parent directories as needed

While I can see the value of "make parent directories as needed", having
it do "no error if existing" could be bad.

Why? initdb is going to fail anyway if it contains anything.

I guess you would want to know right away.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +