File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable>
9292 <listitem>
9393 <para>
9494 The directory that will be used for the tablespace. The directory
95- should be empty and must be owned by the
95+ must exist (<command>CREATE TABLESPACE</command> will not create it),
96+ should be empty, and must be owned by the
9697 <productname>PostgreSQL</productname> system user. The directory must be
9798 specified by an absolute path name.
9899 </para>
@@ -137,15 +138,23 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable>
137138 <title>Examples</title>
138139
139140 <para>
140- Create a tablespace <literal>dbspace</literal> at <literal>/data/dbs</literal>:
141+ To create a tablespace <literal>dbspace</literal> at file system location
142+ <literal>/data/dbs</literal>, first create the directory using operating
143+ system facilities and set the correct ownership:
144+ <programlisting>
145+ mkdir /data/dbs
146+ chown postgres:postgres /data/dbs
147+ </programlisting>
148+ Then issue the tablespace creation command inside
149+ <productname>PostgreSQL</productname>:
141150<programlisting>
142151CREATE TABLESPACE dbspace LOCATION '/data/dbs';
143152</programlisting>
144153 </para>
145154
146155 <para>
147- Create a tablespace <literal>indexspace</literal> at <literal>/data/indexes</literal>
148- owned by user <literal>genevieve</literal> :
156+ To create a tablespace owned by a different database user, use a command
157+ like this :
149158<programlisting>
150159CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';
151160</programlisting></para>
You can’t perform that action at this time.
0 commit comments