ALTER TABLESPACE <refpurpose>change the definition of a tablespace</refpurpose> — テーブル空間の定義を変更する
ALTER TABLESPACEname
RENAME TOnew_name
ALTER TABLESPACEname
OWNER TO {new_owner
| CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER TABLESPACEname
SET (tablespace_option
=value
[, ... ] ) ALTER TABLESPACEname
RESET (tablespace_option
[, ... ] )
<command>ALTER TABLESPACE</command> can be used to change the definition of
a tablespace.
ALTER TABLESPACE
はテーブル空間の定義を変更するのに使うことができます。
You must own the tablespace to change the definition of a tablespace.
To alter the owner, you must also be able to <literal>SET ROLE</literal>
to the new owning role.
(Note that superusers have these privileges automatically.)
テーブル空間の定義を変更するにはテーブル空間の所有者でなければなりません。
所有者を変更するには、新しい所有者ロールに対してSET ROLE
もできなければなりません。
(スーパーユーザがこれらの権限を自動的に持つことに注意してください。)
name
The name of an existing tablespace. 既存のテーブル空間の名前です。
new_name
The new name of the tablespace. The new name cannot
begin with <literal>pg_</literal>, as such names
are reserved for system tablespaces.
テーブル空間の新しい名前です。
pg_
から始まる名前は、システムのテーブル空間用に予約されているため使用することができません。
new_owner
The new owner of the tablespace. テーブル空間の新しい所有者です。
tablespace_option
A tablespace parameter to be set or reset. Currently, the only
available parameters are <varname>seq_page_cost</varname>,
<varname>random_page_cost</varname>, <varname>effective_io_concurrency</varname>
and <varname>maintenance_io_concurrency</varname>.
Setting these values for a particular tablespace will override the
planner's usual estimate of the cost of reading pages from tables in
that tablespace, and how many concurrent I/Os are issued, as established
by the configuration parameters of the
same name (see <xref linkend="guc-seq-page-cost"/>,
<xref linkend="guc-random-page-cost"/>,
<xref linkend="guc-effective-io-concurrency"/>,
<xref linkend="guc-maintenance-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.
値を設定あるいはリセットするテーブル空間のパラメータです。
現在、利用可能なパラメータはseq_page_cost
、random_page_cost
、effective_io_concurrency
、maintenance_io_concurrency
のみです。
特定のテーブル空間について、この値を設定すると、プランナがそのテーブル空間内のテーブルからページを読み込むコストの通常の推定値や、発行される同時I/Oの数について、通常参照する同じ名前の設定パラメータ(seq_page_cost、random_page_cost、effective_io_concurrency、maintenance_io_concurrencyを参照)よりも優先します。
テーブル空間が、他のI/Oサブシステムより高速あるいは低速なディスク上にある時は、これが有用でしょう。
Rename tablespace <literal>index_space</literal> to <literal>fast_raid</literal>:
テーブル空間index_space
をfast_raid
という名前に変更します。
ALTER TABLESPACE index_space RENAME TO fast_raid;
Change the owner of tablespace <literal>index_space</literal>:
テーブル空間index_space
の所有者を変更します。
ALTER TABLESPACE index_space OWNER TO mary;
There is no <command>ALTER TABLESPACE</command> statement in
the SQL standard.
標準SQLにはALTER TABLESPACE
文はありません。