Re: Clarification on Role Access Rights to Table Indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>, Robert Haas <robertmhaas(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-03-09 15:48:05
Message-ID: 279947.1741535285@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> On Sat, Mar 08, 2025 at 05:17:40PM -0500, Tom Lane wrote:
>> ReindexIndex() faces this same problem and solves it with some
>> very complex code that manages to get the table's lock first.

> I noticed that amcheck's bt_index_check_internal() handles this problem,
> ...
> stats_lock_check_privileges() does something similar, but it's not as
> cautious about the "heapid != IndexGetRelation(indrelid, false)" race
> condition.

Egad, we've already got three inconsistent implementations of this
functionality? I think the first step must be to unify them into
a common implementation, if at all possible.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios - cloud 2025-03-10 07:41:38 Re: No. Of wal files generated
Previous Message Nathan Bossart 2025-03-09 01:35:18 Re: Clarification on Role Access Rights to Table Indexes

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-03-09 16:38:49 Re: Parallel CREATE INDEX for GIN indexes
Previous Message Tom Lane 2025-03-09 15:45:41 Re: Printing window function OVER clauses in EXPLAIN