2
.\" Title: ALTER TABLESPACE
3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 11beta1 Documentation
7
.\" Source: PostgreSQL 11beta1
10
.TH "ALTER TABLESPACE" "7" "2018" "PostgreSQL 11beta1" "PostgreSQL 11beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
ALTER_TABLESPACE \- change the definition of a tablespace
35
ALTER TABLESPACE \fIname\fR RENAME TO \fInew_name\fR
36
ALTER TABLESPACE \fIname\fR OWNER TO { \fInew_owner\fR | CURRENT_USER | SESSION_USER }
37
ALTER TABLESPACE \fIname\fR SET ( \fItablespace_option\fR = \fIvalue\fR [, \&.\&.\&. ] )
38
ALTER TABLESPACE \fIname\fR RESET ( \fItablespace_option\fR [, \&.\&.\&. ] )
42
\fBALTER TABLESPACE\fR
43
can be used to change the definition of a tablespace\&.
45
You must own the tablespace to change the definition of a tablespace\&. To alter the owner, you must also be a direct or indirect member of the new owning role\&. (Note that superusers have these privileges automatically\&.)
50
The name of an existing tablespace\&.
55
The new name of the tablespace\&. The new name cannot begin with
56
pg_, as such names are reserved for system tablespaces\&.
61
The new owner of the tablespace\&.
64
\fItablespace_option\fR
66
A tablespace parameter to be set or reset\&. Currently, the only available parameters are
68
\fIrandom_page_cost\fR
70
\fIeffective_io_concurrency\fR\&. Setting either value for a particular tablespace will override the planner\*(Aqs usual estimate of the cost of reading pages from tables in that tablespace, as established by the configuration parameters of the same name (see
73
effective_io_concurrency)\&. 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\&.
86
ALTER TABLESPACE index_space RENAME TO fast_raid;
92
Change the owner of tablespace
99
ALTER TABLESPACE index_space OWNER TO mary;
107
\fBALTER TABLESPACE\fR
108
statement in the SQL standard\&.
110
CREATE TABLESPACE (\fBCREATE_TABLESPACE\fR(7)), DROP TABLESPACE (\fBDROP_TABLESPACE\fR(7))