mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
This patch only supports seq_page_cost and random_page_cost as parameters, but it provides the infrastructure to scalably support many more. In particular, we may want to add support for effective_io_concurrency, but I'm leaving that as future work for now. Thanks to Tom Lane for design help and Alvaro Herrera for the review.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.241 2009/12/25 01:09:31 rhaas Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.242 2010/01/05 21:53:58 rhaas Exp $ -->
|
||||
|
||||
<chapter Id="runtime-config">
|
||||
<title>Server Configuration</title>
|
||||
@ -2000,6 +2000,9 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
|
||||
<para>
|
||||
Sets the planner's estimate of the cost of a disk page fetch
|
||||
that is part of a series of sequential fetches. The default is 1.0.
|
||||
This value can be overriden for a particular tablespace by setting
|
||||
the tablespace parameter of the same name
|
||||
(see <xref linkend="sql-altertablespace">).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -2013,6 +2016,12 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
|
||||
<para>
|
||||
Sets the planner's estimate of the cost of a
|
||||
non-sequentially-fetched disk page. The default is 4.0.
|
||||
This value can be overriden for a particular tablespace by setting
|
||||
the tablespace parameter of the same name
|
||||
(see <xref linkend="sql-altertablespace">).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Reducing this value relative to <varname>seq_page_cost</>
|
||||
will cause the system to prefer index scans; raising it will
|
||||
make index scans look relatively more expensive. You can raise
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tablespace.sgml,v 1.5 2009/09/19 10:23:26 petere Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tablespace.sgml,v 1.6 2010/01/05 21:53:58 rhaas Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -23,6 +23,8 @@ PostgreSQL documentation
|
||||
<synopsis>
|
||||
ALTER TABLESPACE <replaceable>name</replaceable> RENAME TO <replaceable>new_name</replaceable>
|
||||
ALTER TABLESPACE <replaceable>name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
|
||||
ALTER TABLESPACE <replaceable>name</replaceable> SET ( <replaceable class="PARAMETER">tablespace_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )
|
||||
ALTER TABLESPACE <replaceable>name</replaceable> RESET ( <replaceable class="PARAMETER">tablespace_option</replaceable> [, ... ] )
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@ -74,6 +76,24 @@ ALTER TABLESPACE <replaceable>name</replaceable> OWNER TO <replaceable>new_owner
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">tablespace_parameter</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