</varlistentry>
<varlistentry id="sql-altertable-desc-cluster-on">
<term><literal>CLUSTER ON</literal></term>
<listitem>
<para>
This form selects the default index for future
<link linkend="sql-cluster"><command>CLUSTER</command></link>
operations. It does not actually re-cluster the table.
</para>
<para>
Changing cluster options acquires a <literal>SHARE UPDATE EXCLUSIVE</literal> lock.
</para>
</listitem>
</varlistentry>
<varlistentry id="sql-altertable-desc-set-without-cluster">
<term><literal>SET WITHOUT CLUSTER</literal></term>
<listitem>
<para>
This form removes the most recently used
<link linkend="sql-cluster"><command>CLUSTER</command></link>
index specification from the table. This affects
future cluster operations that don't specify an index.
</para>
<para>
Changing cluster options acquires a <literal>SHARE UPDATE EXCLUSIVE</literal> lock.
</para>
</listitem>
</varlistentry>
<varlistentry id="sql-altertable-desc-set-without-oids">
<term><literal>SET WITHOUT OIDS</literal></term>
<listitem>
<para>
Backward-compatible syntax for removing the <literal>oid</literal>
system column. As <literal>oid</literal> system columns cannot be
added anymore, this never has an effect.
</para>
</listitem>
</varlistentry>
<varlistentry id="sql-altertable-desc-set-access-method">
<term><literal>SET ACCESS METHOD</literal></term>
<listitem>
<para>
This form changes the access method of the table by rewriting it
using the indicated access method; specifying
<literal>DEFAULT</literal> selects the access method set as the
<xref linkend="guc-default-table-access-method"/> configuration
parameter.
See <xref linkend="tableam"/> for more information.
</para>
<para>
When applied to a partitioned table, there is no data to rewrite,
but partitions created afterwards will default to the given access
method unless overridden by a <literal>USING</literal> clause.
Specifying <varname>DEFAULT</varname> removes a previous value,
causing future partitions to default to
<varname>default_table_access_method</varname>.
</para>
</listitem>
</varlistentry>
<varlistentry id="sql-altertable-desc-set-tablespace">
<term><literal>SET TABLESPACE</literal></term>
<listitem>
<para>
This form changes the table's tablespace to the specified tablespace and
moves the data file(s) associated with the table to the new tablespace.
Indexes on the table, if any, are not moved; but they can be moved
separately with additional <literal>SET TABLESPACE</literal> commands.
When applied to a partitioned table, nothing is moved, but any
partitions created afterwards with
<command>CREATE TABLE PARTITION OF</command> will use that tablespace,
unless overridden by a <literal>TABLESPACE</literal> clause.
</para>
<para>
All tables in the current database in a tablespace can be moved by using
the <literal>ALL IN TABLESPACE</literal> form, which will lock all tables
to be moved first and then move each one. This form also supports
<literal>OWNED BY</literal>, which will only move tables owned by the
roles specified. If the <literal>NOWAIT</literal> option is specified
then the command will fail if it is unable to acquire all of the locks
required immediately. Note that system catalogs are not moved by this
command; use <command>ALTER DATABASE</command> or explicit
<command>ALTER TABLE</command> invocations instead if desired. The
<literal>information_schema</literal> relations are not considered part
of the system catalogs and will be moved.
See also
<link linkend="sql-createtablespace"><command>CREATE TABLESPACE</command></link>.
</para>