1ALTER TABLESPACE(7) PostgreSQL 11.6 Documentation ALTER TABLESPACE(7)
2
3
4
6 ALTER_TABLESPACE - change the definition of a tablespace
7
9 ALTER TABLESPACE name RENAME TO new_name
10 ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
11 ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] )
12 ALTER TABLESPACE name RESET ( tablespace_option [, ... ] )
13
15 ALTER TABLESPACE can be used to change the definition of a tablespace.
16
17 You must own the tablespace to change the definition of a tablespace.
18 To alter the owner, you must also be a direct or indirect member of the
19 new owning role. (Note that superusers have these privileges
20 automatically.)
21
23 name
24 The name of an existing tablespace.
25
26 new_name
27 The new name of the tablespace. The new name cannot begin with pg_,
28 as such names are reserved for system tablespaces.
29
30 new_owner
31 The new owner of the tablespace.
32
33 tablespace_option
34 A tablespace parameter to be set or reset. Currently, the only
35 available parameters are seq_page_cost, random_page_cost and
36 effective_io_concurrency. Setting either value for a particular
37 tablespace will override the planner's usual estimate of the cost
38 of reading pages from tables in that tablespace, as established by
39 the configuration parameters of the same name (see seq_page_cost,
40 random_page_cost, effective_io_concurrency). This may be useful if
41 one tablespace is located on a disk which is faster or slower than
42 the remainder of the I/O subsystem.
43
45 Rename tablespace index_space to fast_raid:
46
47 ALTER TABLESPACE index_space RENAME TO fast_raid;
48
49 Change the owner of tablespace index_space:
50
51 ALTER TABLESPACE index_space OWNER TO mary;
52
54 There is no ALTER TABLESPACE statement in the SQL standard.
55
57 CREATE TABLESPACE (CREATE_TABLESPACE(7)), DROP TABLESPACE
58 (DROP_TABLESPACE(7))
59
60
61
62PostgreSQL 11.6 2019 ALTER TABLESPACE(7)