CLUSTER indexname ON table
Use this parameter to supply the name of an index location.
Use this paramter to supply the name of the table you wish to cluster.
Use the CLUSTER command to cluster a table with a specific index. The table (identified by the table parameter) must already exist and the index (identified by the index parameter) must exist on the table.
During clustering, a table is reordered in an arrangement based on the supplied index. A cluster is a one-time operation upon a table; to re-cluster a table, you must execute the command again.
When a cluster is created, the table is actually being copied to a temporary table according to index order, then it is renamed to the original table name. Because of this, all permissions and other indexes are lost when clustering is performed.
The following example clusters the book relation on the basis of its isbn attribute.
CLUSTER isbn ON book;