Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb0d3636

Browse files
committed
doc: Fix up ALTER TABLESPACE reference page
The documentation of ALTER TABLESPACE ... MOVE was added without anymarkup, not even paragraph breaks. Fix that, and clarify the text in afew places.
1 parentc8e2e0e commitb0d3636

File tree

1 file changed

+44
-29
lines changed

1 file changed

+44
-29
lines changed

‎doc/src/sgml/ref/alter_tablespace.sgml

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,45 @@ ALTER TABLESPACE <replaceable>name</replaceable> MOVE { ALL | TABLES | INDEXES |
4343
To alter the owner, you must also be a direct or indirect member of the new
4444
owning role.
4545
(Note that superusers have these privileges automatically.)
46+
</para>
47+
48+
<para>
49+
<literal>ALTER TABLESPACE ... MOVE</literal> moves objects between
50+
tablespaces. <literal>ALL</literal> will move all tables, indexes and
51+
materialized views; specifying <literal>TABLES</literal> will move only
52+
tables (but not their indexes), <literal>INDEXES</literal> will only move
53+
indexes (including those underneath materialized views, but not tables),
54+
and <literal>MATERIALIZED VIEWS</literal> will only move the table relation
55+
of the materialized view (but no indexes associated with it). Users can
56+
also specify a list of roles whose objects are to be moved, using
57+
<literal>OWNED BY</literal>.
58+
</para>
4659

47-
Users may use ALTER TABLESPACE ... MOVE to move objects between tablespaces.
48-
ALL will move all tables, indexes and materialized views while specifying
49-
TABLES will move only tables (but not their indexes), INDEXES will only move
50-
indexes (including those underneath materialized views, but not tables) and
51-
MATERIALIZED VIEWS will only move the table relation of the materialized
52-
view (but no indexes associated with it). Users may also specify a list of
53-
roles whose objects are to be moved using OWNED BY.
54-
55-
Users must have CREATE rights on the new tablespace and be considered an
56-
owner (either directly or indirectly) on all objects to be moved. Note that
57-
the superuser is considered an owner of all objects and therefore an
58-
ALTER TABLESPACE ... MOVE ALL issued by the superuser will move all objects
59-
in the current database which are in the tablespace.
60-
61-
All objects to be moved will be locked immediately by the command. The
62-
NOWAIT option, if specified, will cause the command to fail if it is unable
63-
to acquire the locks.
64-
65-
System catalogs will not be moved by this command- individuals wishing to
66-
move a whole database should use ALTER DATABASE, or call ALTER TABLE on the
67-
individual system catalogs. Note that relations in <literal>information_schema</literal>
68-
will be moved, just as any other normal database objects, if the user is the
69-
superuser or considered an owner of the relations in <literal>information_schema</literal>.
60+
<para>
61+
Users must have <literal>CREATE</literal> rights on the new tablespace and
62+
be considered an owner (either directly or indirectly) of all objects to be
63+
moved. Note that the superuser is considered an owner of all objects, and
64+
therefore an <literal>ALTER TABLESPACE ... MOVE ALL</literal> issued by the
65+
superuser will move all objects in the current database that are in the
66+
tablespace. (Attempting to move objects without the required rights will
67+
result in an error. Non-superusers can use <literal>OWNED BY</literal> in
68+
such cases, to restrict the set of objects moved to those with the required
69+
rights.)
70+
</para>
71+
72+
<para>
73+
All objects to be moved will be locked immediately by the command. If the
74+
<literal>NOWAIT</literal> is specified, it will cause the command to fail
75+
if it is unable to acquire the locks.
76+
</para>
77+
78+
<para>
79+
System catalogs will not be moved by this command. To move a whole
80+
database, use <command>ALTER DATABASE</command>, or call <command>ALTER
81+
TABLE</command> on the individual system catalogs. Note that relations in
82+
<literal>information_schema</literal> will be moved, just as any other
83+
normal database objects, if the user is the superuser or considered an
84+
owner of the relations in <literal>information_schema</literal>.
7085
</para>
7186
</refsect1>
7287

@@ -125,7 +140,7 @@ ALTER TABLESPACE <replaceable>name</replaceable> MOVE { ALL | TABLES | INDEXES |
125140
<term><replaceable class="parameter">role_name</replaceable></term>
126141
<listitem>
127142
<para>
128-
Role(s) whose objects are to be moved.
143+
Role whose objects are to be moved.
129144
</para>
130145
</listitem>
131146
</varlistentry>
@@ -135,20 +150,20 @@ ALTER TABLESPACE <replaceable>name</replaceable> MOVE { ALL | TABLES | INDEXES |
135150
<listitem>
136151
<para>
137152
The name of the tablespace to move objects into. The user must have
138-
CREATE rights on the new tablespace to move objects into that
153+
<literal>CREATE</literal> rights on the new tablespace to move objects into that
139154
tablespace, unless the tablespace being moved into is the default
140155
tablespace for the database connected to.
141156
</para>
142157
</listitem>
143158
</varlistentry>
144159

145160
<varlistentry>
146-
<term><replaceable class="parameter">NOWAIT</replaceable></term>
161+
<term>NOWAIT</term>
147162
<listitem>
148163
<para>
149-
The NOWAIT option causes the ALTER TABLESPACE command to fail immediately
164+
The<literal>NOWAIT</literal> option causes the<command>ALTER TABLESPACE</command> command to fail immediately
150165
if it is unable to acquire the necessary lock on all of the objects being
151-
move.
166+
moved.
152167
</para>
153168
</listitem>
154169
</varlistentry>
@@ -173,7 +188,7 @@ ALTER TABLESPACE index_space OWNER TO mary;
173188
</programlisting></para>
174189

175190
<para>
176-
Move all of the objectswhich I ownfrom the default tablespace to
191+
Move all of the objects from the default tablespace to
177192
the <literal>fast_raid</literal> tablespace:
178193
<programlisting>
179194
ALTER TABLESPACE pg_default MOVE ALL TO fast_raid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp