~ubuntu-branches/debian/experimental/postgresql-11/experimental

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/ALTER_TABLESPACE.7

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2018-05-22 14:19:08 UTC
  • Revision ID: package-import@ubuntu.com-20180522141908-0oy9ujs1b5vrda74
Tags: upstream-11~beta1
ImportĀ upstreamĀ versionĀ 11~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: ALTER TABLESPACE
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2018
 
6
.\"    Manual: PostgreSQL 11beta1 Documentation
 
7
.\"    Source: PostgreSQL 11beta1
 
8
.\"  Language: English
 
9
.\"
 
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
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
18
.ie \n(.g .ds Aq \(aq
 
19
.el       .ds Aq '
 
20
.\" -----------------------------------------------------------------
 
21
.\" * set default formatting
 
22
.\" -----------------------------------------------------------------
 
23
.\" disable hyphenation
 
24
.nh
 
25
.\" disable justification (adjust text to left margin only)
 
26
.ad l
 
27
.\" -----------------------------------------------------------------
 
28
.\" * MAIN CONTENT STARTS HERE *
 
29
.\" -----------------------------------------------------------------
 
30
.SH "NAME"
 
31
ALTER_TABLESPACE \- change the definition of a tablespace
 
32
.SH "SYNOPSIS"
 
33
.sp
 
34
.nf
 
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 [, \&.\&.\&. ] )
 
39
.fi
 
40
.SH "DESCRIPTION"
 
41
.PP
 
42
\fBALTER TABLESPACE\fR
 
43
can be used to change the definition of a tablespace\&.
 
44
.PP
 
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\&.)
 
46
.SH "PARAMETERS"
 
47
.PP
 
48
\fIname\fR
 
49
.RS 4
 
50
The name of an existing tablespace\&.
 
51
.RE
 
52
.PP
 
53
\fInew_name\fR
 
54
.RS 4
 
55
The new name of the tablespace\&. The new name cannot begin with
 
56
pg_, as such names are reserved for system tablespaces\&.
 
57
.RE
 
58
.PP
 
59
\fInew_owner\fR
 
60
.RS 4
 
61
The new owner of the tablespace\&.
 
62
.RE
 
63
.PP
 
64
\fItablespace_option\fR
 
65
.RS 4
 
66
A tablespace parameter to be set or reset\&. Currently, the only available parameters are
 
67
\fIseq_page_cost\fR,
 
68
\fIrandom_page_cost\fR
 
69
and
 
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
 
71
seq_page_cost,
 
72
random_page_cost,
 
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\&.
 
74
.RE
 
75
.SH "EXAMPLES"
 
76
.PP
 
77
Rename tablespace
 
78
index_space
 
79
to
 
80
fast_raid:
 
81
.sp
 
82
.if n \{\
 
83
.RS 4
 
84
.\}
 
85
.nf
 
86
ALTER TABLESPACE index_space RENAME TO fast_raid;
 
87
.fi
 
88
.if n \{\
 
89
.RE
 
90
.\}
 
91
.PP
 
92
Change the owner of tablespace
 
93
index_space:
 
94
.sp
 
95
.if n \{\
 
96
.RS 4
 
97
.\}
 
98
.nf
 
99
ALTER TABLESPACE index_space OWNER TO mary;
 
100
.fi
 
101
.if n \{\
 
102
.RE
 
103
.\}
 
104
.SH "COMPATIBILITY"
 
105
.PP
 
106
There is no
 
107
\fBALTER TABLESPACE\fR
 
108
statement in the SQL standard\&.
 
109
.SH "SEE ALSO"
 
110
CREATE TABLESPACE (\fBCREATE_TABLESPACE\fR(7)), DROP TABLESPACE (\fBDROP_TABLESPACE\fR(7))