Re: Clarification on Role Access Rights to Table Indexes

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ayush Vatsa <ayushvatsa1810@gmail.com>, "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2025-02-17T18:43:04Z
Lists: pgsql-hackers, pgsql-general
On Monday, February 17, 2025, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> 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.


This is our contrib module so this seems like the expected place to ask
such a question.  It’s neither a bug nor a topic for -hackers.  FTR, Robert
Haas is the author from 2013.  Not sure he monitors -general though.

David J.

Commits

  1. Fix privilege checks for pg_prewarm() on indexes.

  2. Fix lookup code for REINDEX INDEX.

  3. Fix redefinition of typedef RangeVar.

  4. Fix lookups in pg_{clear,restore}_{attribute,relation}_stats().

  5. dblink: Avoid locking relation before privilege check.