mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Add CREATE TABLESPACE ... WITH ... Options
Tablespaces have a few options which can be set on them to give PG hints as to how the tablespace behaves (perhaps it's faster for sequential scans, or better able to handle random access, etc). These options were only available through the ALTER TABLESPACE command. This adds the ability to set these options at CREATE TABLESPACE time, removing the need to do both a CREATE TABLESPACE and ALTER TABLESPACE to get the correct options set on the tablespace. Vik Fearing, reviewed by Michael Paquier.
This commit is contained in:
@@ -21,7 +21,10 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> [ OWNER <replaceable class="parameter">user_name</replaceable> ] LOCATION '<replaceable class="parameter">directory</replaceable>'
|
||||
CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable>
|
||||
[ OWNER <replaceable class="parameter">user_name</replaceable> ]
|
||||
LOCATION '<replaceable class="parameter">directory</replaceable>'
|
||||
[ WITH ( <replaceable class="PARAMETER">tablespace_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] ) ]
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@@ -87,6 +90,24 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> [
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">tablespace_option</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A tablespace parameter to be set or reset. Currently, the only
|
||||
available parameters are <varname>seq_page_cost</> and
|
||||
<varname>random_page_cost</>. Setting either value for a particular
|
||||
tablespace will override the planner's usual estimate of the cost of
|
||||
reading pages from tables in that tablespace, as established by
|
||||
the configuration parameters of the same name (see
|
||||
<xref linkend="guc-seq-page-cost">,
|
||||
<xref linkend="guc-random-page-cost">). This may be useful if one
|
||||
tablespace is located on a disk which is faster or slower than the
|
||||
remainder of the I/O subsystem.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
Reference in New Issue
Block a user