Re: CLUSTER trashing indexes - Mailing list pgsql-novice

From Tom Lane
Subject Re: CLUSTER trashing indexes
Date
Msg-id 3572.972230687@sss.pgh.pa.us
Whole thread Raw
In response to CLUSTER trashing indexes  (Jason Davis <jdavis@tassie.net.au>)
List pgsql-novice
Jason Davis <jdavis@tassie.net.au> writes:
> Have I missed something in the release notes or known bugs list,

From the CLUSTER manual page:

: The table is actually copied to a temporary table in index order, then
: renamed back to the original name. For this reason, all grant
: permissions and other indexes are lost when clustering is performed.

The man page fails to point out that you also lose constraints, etc.
What's left after cluster is not much except the data and the one index.
You can rebuild all that stuff, but it's a pain to have to do so.

This is a really sucky implementation, and fixing it has been on the
TODO list for a long time.  We need a way of doing filename versioning
first...

            regards, tom lane

pgsql-novice by date:

Previous
From: Jason Davis
Date:
Subject: CLUSTER trashing indexes
Next
From: Scott Favelle
Date:
Subject: RE: database design