Re: CLUSTER command - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: CLUSTER command
Date
Msg-id 4F168BF40200002500044900@gw.wicourts.gov
Whole thread Raw
In response to CLUSTER command  (Rick Dicaire <kritek@gmail.com>)
Responses Re: CLUSTER command  (Rick Dicaire <kritek@gmail.com>)
List pgsql-admin
Rick Dicaire <kritek@gmail.com> wrote:

> Hi folks...pgsql 8.1 (we're migrating to 9.1 later this year).

Good idea.

> When running CLUSTER with no args, on tables with multiple
> indexes, do I understand correctly that the tables' primary key is
> the default index used?

To quote the fine documentations at:

www.postgresql.org/docs/8.1/interactive/sql-cluster.html

| When a table is clustered, PostgreSQL remembers on which index it
| was clustered. The form CLUSTER tablename reclusters the table on
| the same index that it was clustered before.
|
| CLUSTER without any parameter reclusters all the tables in the
| current database that the calling user owns, or all tables if
| called by a superuser. (Never-clustered tables are not included.)

> Also, I've been tasked with finding and listing all the tables
> that get CLUSTER'd when CLUSTER with no args is executed,

http://www.postgresql.org/docs/8.1/interactive/catalog-pg-index.html

-Kevin

pgsql-admin by date:

Previous
From: Rick Dicaire
Date:
Subject: CLUSTER command
Next
From: Rick Dicaire
Date:
Subject: Re: CLUSTER command