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