Thread: un-CLUSTER?

un-CLUSTER?

From
Jeff Boes
Date:
Is there a way to turn off the CLUSTER setting for a table?

I did a "CLUSTER index ON table" for a number of tables. Now I want to
do a raw CLUSTER command across the whole database, but I'd really like
to turn off the CLUSTER setting for one of the tables (because it takes
too long). I don't see anything that will allow me to do that (other
than dropping and recreating the table).

--
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
            ...Nexcerpt... Extend your Expertise

Re: un-CLUSTER?

From
Tom Lane
Date:
Jeff Boes <jboes@nexcerpt.com> writes:
> Is there a way to turn off the CLUSTER setting for a table?

I think you'd just have to reach in and turn off the indisclustered
(sp?) flag in the appropriate row of pg_index.

            regards, tom lane

Re: un-CLUSTER?

From
Bruce Momjian
Date:
Tom Lane wrote:
> Jeff Boes <jboes@nexcerpt.com> writes:
> > Is there a way to turn off the CLUSTER setting for a table?
>
> I think you'd just have to reach in and turn off the indisclustered
> (sp?) flag in the appropriate row of pg_index.

Added to TODO:

    Add way to remove cluster specification on a table

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073