Re: Loss of cluster status - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Loss of cluster status
Date
Msg-id 0aa601c2d983$cd29ff60$6500a8c0@fhp.internal
Whole thread Raw
In response to Loss of cluster status  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Loss of cluster status
List pgsql-hackers
> The new cluster is cool in that :
>
> 1. It works
> 2. It saves the indisclustered status
>
> However, after a dump and restore, this indisclustered status will be
lost.
> Would it be an idea to issue a CLUSTER command after the CREATE TABLE
> statement in SQL dumps for tables that have an indisclustered index?

Actually, rather than a full-blown CLUSTER, how about...:

UPDATE pg_index SET indisclustered=true WHERE indrelid=(SELECT oid FROM
pg_class WHERE relname='mytable' AND relnamespace = (SELECT oid FROM
pg_namespace WHERE nspname=CURRENT_SCHEMA()));

Hmmm...need something for index name as well tho...

Is that an idea?

Chris




pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Loss of cluster status
Next
From: Christoph Haller
Date:
Subject: ecpg vs. libpq