diff --git a/doc/src/sgml/ref/create_tablespace.sgml b/doc/src/sgml/ref/create_tablespace.sgml
index 18fa5f0ebf0..c621ec2c6bf 100644
--- a/doc/src/sgml/ref/create_tablespace.sgml
+++ b/doc/src/sgml/ref/create_tablespace.sgml
@@ -92,7 +92,8 @@ CREATE TABLESPACE tablespace_name
The directory that will be used for the tablespace. The directory
- should be empty and must be owned by the
+ must exist (CREATE TABLESPACE will not create it),
+ should be empty, and must be owned by the
PostgreSQL system user. The directory must be
specified by an absolute path name.
@@ -137,15 +138,23 @@ CREATE TABLESPACE tablespace_name
Examples
- Create a tablespace dbspace at /data/dbs:
+ To create a tablespace dbspace at file system location
+ /data/dbs, first create the directory using operating
+ system facilities and set the correct ownership:
+
+mkdir /data/dbs
+chown postgres:postgres /data/dbs
+
+ Then issue the tablespace creation command inside
+ PostgreSQL:
CREATE TABLESPACE dbspace LOCATION '/data/dbs';
- Create a tablespace indexspace at /data/indexes
- owned by user genevieve:
+ To create a tablespace owned by a different database user, use a command
+ like this:
CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';