From: | Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Clarification on Role Access Rights to Table Indexes |
Date: | 2025-02-17 18:39:33 |
Message-ID: | CACX+KaNQ9ahSb-TP-N2RELD4wFNGuXHx7C7t+Dtf_zeGSLDybw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> This is pointless, everyone (i.e. the PUBLIC pseudo-role) can already
read pg_class.
True, Just checked that.
> It fails because AFAICS there is no way for it to work on an index, only
tables.
pg_prewarm extension works on index if we have right (SELECT) privileges
postgres=# CREATE TABLE x(id INT);
CREATE TABLE
postgres=# CREATE INDEX idx ON x(id);
CREATE INDEX
postgres=# INSERT INTO x SELECT * FROM generate_series(1,10000);
INSERT 0 10000
postgres=# SELECT pg_prewarm('x');
pg_prewarm
------------
45
(1 row)
postgres=# SELECT pg_prewarm('idx');
pg_prewarm
------------
30
(1 row)
> It seems like ownership of the table would be more appropriate, or maybe
> access to one of the built-in roles like pg_maintain.
True, adding Robert Haas (author) to this thread for his opinion.
Regards,
Ayush Vatsa
SDE AWS
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-02-17 18:43:04 | Re: Clarification on Role Access Rights to Table Indexes |
Previous Message | Tom Lane | 2025-02-17 18:27:30 | Re: Clarification on Role Access Rights to Table Indexes |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-02-17 18:43:04 | Re: Clarification on Role Access Rights to Table Indexes |
Previous Message | Alena Rybakina | 2025-02-17 18:36:14 | Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans) |