Re: Clarification on Role Access Rights to Table Indexes - Mailing list pgsql-general

From Tom Lane
Subject Re: Clarification on Role Access Rights to Table Indexes
Date
Msg-id 855988.1739816850@sss.pgh.pa.us
Whole thread Raw
In response to Clarification on Role Access Rights to Table Indexes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Clarification on Role Access Rights to Table Indexes
Re: Clarification on Role Access Rights to Table Indexes
List pgsql-general
Ayush Vatsa <ayushvatsa1810@gmail.com> writes:
> postgres=> SELECT pg_prewarm('pg_class_oid_index');
> ERROR:  permission denied for index pg_class_oid_index

You'd really have to take that up with the author of pg_prewarm.
It's not apparent to me why checking SQL access permissions is
the right mechanism for limiting use of pg_prewarm.  It seems
like ownership of the table would be more appropriate, or maybe
access to one of the built-in roles like pg_maintain.

> 1. Can a role have access rights to a table without having access to its
> index?

Indexes do not have access rights of their own, which is why
access rights are a poor gating mechanism for something that
needs to be applicable to indexes.  Ownership could work,
because we make indexes inherit their table's ownership.

            regards, tom lane



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Clarification on Role Access Rights to Table Indexes
Next
From: Ayush Vatsa
Date:
Subject: Re: Clarification on Role Access Rights to Table Indexes