Re: Loss of cluster status

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Loss of cluster status
Date: 2003-02-21 08:32:42
Message-ID: 0aa601c2d983$cd29ff60$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-02-21 09:58:33 Re: Bytea misconceptions
Previous Message Christopher Kings-Lynne 2003-02-21 08:10:13 Loss of cluster status