move_chunk function acts like a combination of the
CLUSTER command and
ALTER TABLE…SET TABLESPACE commands. Unlike
these commands, however, the move_chunk function uses lower lock
levels so that the and are able to be read for most of the
process. This comes at a cost of slightly higher disk usage during the
operation. For a more detailed discussion of this capability, see the
documentation on managing storage with tablespaces.
You must be logged in as a super user, such as the
postgres user,
to use the move_chunk() call.Samples
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
chunk | REGCLASS | - | ✔ | Name of to be moved |
destination_tablespace | NAME | - | ✔ | Target tablespace for being moved |
index_destination_tablespace | NAME | - | ✔ | Target tablespace for index associated with the you are moving |
reorder_index | REGCLASS | - | ✖ | The name of the index (on either the or ) to order by |
verbose | BOOLEAN | FALSE | ✖ | Setting to true displays messages about the progress of the move_chunk command. |