Re: ALTER TABLE OWNER: change indexes - Mailing list pgsql-patches

From Tom Lane
Subject Re: ALTER TABLE OWNER: change indexes
Date
Msg-id 28130.1015911649@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE OWNER: change indexes  (Yury Bokhoncovich <byg@center-f1.ru>)
Responses Re: ALTER TABLE OWNER: change indexes
List pgsql-patches
Yury Bokhoncovich <byg@center-f1.ru> writes:
> 2) I (admin) have a few tables as owner and wanna give another user
> (programmer) ability to create/drop any necessary indices. At the same
> time I do not wanna give him (her) a chance to drop/alter the table
> itself.

But keep in mind that CREATE UNIQUE INDEX does alter the table, in
the sense that subsequent operations may fail where they'd not have
done before.  Conversely, dropping a unique index may allow logically
invalid data to be inserted.  Also, dropping an index may cause important
operations to take vastly longer than they're expected to.  So giving
away the right to manipulate indexes is at the very least an opening
to denial-of-service problems.

In any case, what you are really suggesting here is that we offer a
grantable "right to create/drop indexes" on a *table*.  Dangerous or
not, it could be useful.  But it has nothing that I can see to do with
a notion of ownership of the indexes themselves; there's still no visible
reason to consider the indexes to have ownership independent of the
table they're on.

            regards, tom lane

pgsql-patches by date:

Previous
From: Yury Bokhoncovich
Date:
Subject: Re: ALTER TABLE OWNER: change indexes
Next
From: Paul Eggert
Date:
Subject: Re: support for POSIX 1003.1-2001 hosts