File tree 1 file changed +13
-4
lines changed
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>
92
92
<listitem>
93
93
<para>
94
94
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
96
97
<productname>PostgreSQL</productname> system user. The directory must be
97
98
specified by an absolute path name.
98
99
</para>
@@ -137,15 +138,23 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable>
137
138
<title>Examples</title>
138
139
139
140
<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>:
141
150
<programlisting>
142
151
CREATE TABLESPACE dbspace LOCATION '/data/dbs';
143
152
</programlisting>
144
153
</para>
145
154
146
155
<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 :
149
158
<programlisting>
150
159
CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';
151
160
</programlisting></para>
You can’t perform that action at this time.
0 commit comments