Re: 'cluster' messes up a table

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: postgres(at)vrane(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 'cluster' messes up a table
Date: 2002-04-16 04:46:12
Message-ID: 200204160446.g3G4kDm10264@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


This is documented in the CLUSTER manual page, and we realize it is a
major limitation of the command.

---------------------------------------------------------------------------

postgres(at)vrane(dot)com wrote:
> I don't know if this is a feature or
> bug but my experiment with 'cluster'
> went hay wire.
>
> Version is 7.2.1
>
> Clustering one index on a table
> kills all other indices as well
> as remove permissions.
>
> Below is the interactive demonstration
> ---------------------------------------
> what=> drop table t;
> DROP
> what=> create table t ( a int, b int);
> CREATE
> what=> create index t_a on t (a);
> CREATE
> what=> create index t_b on t (b);
> CREATE
> what=> \d t
> Table "t"
> Column | Type | Modifiers
> --------+---------+-----------
> a | integer |
> b | integer |
> Indexes: t_a,
> t_b
>
> what=> grant all on t to httpd;
> GRANT
> what=> \c - httpd
> You are now connected as new user httpd.
> what=> insert into t values(1,2);
> INSERT 2133431 1
> what=> select * from t ;
> a | b
> ---+---
> 1 | 2
> (1 row)
>
> what=> \c - pg
> You are now connected as new user pg.
> what=> cluster t_a on t;
> CLUSTER
> what=> \c - httpd
> You are now connected as new user httpd.
> what=> select * from t
> what-> ;
> ERROR: t: Permission denied.
> ERROR: t: Permission denied.
> what=> \d t
> Table "t"
> Column | Type | Modifiers
> --------+---------+-----------
> a | integer |
> b | integer |
> Indexes: t_a
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Loftis 2002-04-16 04:52:38 Re: function for creating random id
Previous Message postgres 2002-04-16 04:42:57 'cluster' messes up a table