Re: Clarification on Role Access Rights to Table Indexes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification on Role Access Rights to Table Indexes
Date: 2025-02-17 21:34:45
Message-ID: CA+TgmobSc_x6thvXZvHoni5Gs5-wsxyTRiOMKoeuX5br0PCtDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Feb 17, 2025 at 2:57 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com> writes:
> >> As it stands, a superuser can prewarm an index (because she bypasses all
> >> privilege checks including this one), but nobody else can.
>
> > That's not fully true. Any role can prewarm an index if the role has the
> > correct privileges.
>
> Ah, right. An index will have null pg_class.relacl, which'll be
> interpreted as "owner has all rights", so it will work for the
> table owner too. Likely this explains the lack of prior complaints.
> It's still a poor design IMO.

I'm not sure if I'd call that a "design". Sounds like I just made a
mistake here.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-02-17 21:36:37 Re: Loading the latest N rows into the cache seems way too fast.
Previous Message Christoph Moench-Tegeder 2025-02-17 21:25:08 Re: Loading the latest N rows into the cache seems way too fast.

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-02-17 21:42:44 Re: revamp row-security tracking
Previous Message Thomas Munro 2025-02-17 21:33:12 Re: Commitfest app release on Feb 17 with many improvements