From d86d51a95810caebcea587498068ff32fe28293e Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 5 Jan 2010 21:54:00 +0000 Subject: 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. --- doc/src/sgml/config.sgml | 11 ++++++++++- doc/src/sgml/ref/alter_tablespace.sgml | 22 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index df8f858c545..34f472555e5 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -2000,6 +2000,9 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows 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 ). @@ -2013,6 +2016,12 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows 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 ). + + + Reducing this value relative to seq_page_cost will cause the system to prefer index scans; raising it will make index scans look relatively more expensive. You can raise diff --git a/doc/src/sgml/ref/alter_tablespace.sgml b/doc/src/sgml/ref/alter_tablespace.sgml index 8c5341dd084..758ee13aa69 100644 --- a/doc/src/sgml/ref/alter_tablespace.sgml +++ b/doc/src/sgml/ref/alter_tablespace.sgml @@ -1,5 +1,5 @@ @@ -23,6 +23,8 @@ PostgreSQL documentation ALTER TABLESPACE name RENAME TO new_name ALTER TABLESPACE name OWNER TO new_owner +ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] ) +ALTER TABLESPACE name RESET ( tablespace_option [, ... ] ) @@ -74,6 +76,24 @@ ALTER TABLESPACE name OWNER TO new_owner + + + tablespace_parameter + + + A tablespace parameter to be set or reset. Currently, the only + available parameters are seq_page_cost and + 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 + , + ). 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. + + + -- cgit v1.2.3