doc: Ensure intermediate path creation with mkdir
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 16 Mar 2022 10:38:29 +0000 (11:38 +0100)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 16 Mar 2022 10:38:29 +0000 (11:38 +0100)
The mkdir command in the Installation from Source Short Version docs
didn't use the -p intermediate path creation parameter which likely
would cause the command to fail.  At the time of writing, -p wasn't
universally available but it can now be relied upon existing. The -p
parameter is defined by POSIX, at least since posix-2004.

Reported-by: Daniel Westermann <daniel.westermann@dbi-services.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/ZR0P278MB0920263E7F2D546A33E50079D20E9@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM

doc/src/sgml/installation.sgml

index a239bbef2f5a7d3a0c24dc05216bf5db8e98eda9..dcd1e772c6cab4c8024b70b3c90cf71aa61a0688 100644 (file)
@@ -41,7 +41,7 @@ make
 su
 make install
 adduser postgres
-mkdir /usr/local/pgsql/data
+mkdir -p /usr/local/pgsql/data
 chown postgres /usr/local/pgsql/data
 su - postgres
 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data