From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Ted Yu <yuzhihong(at)gmail(dot)com>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX |
Date: | 2023-06-21 16:26:09 |
Message-ID: | d2eefebb5482be267dc19c07578257067dbd3ae9.camel@j-davis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2023-06-21 at 07:53 +0900, Michael Paquier wrote:
> I am not sure to understand this last sentence. REINDEX on a
> partitioned table builds a list of the indexes to work on in the
> first
> transaction processing the command in ReindexPartitions(), and there
> is no need to process partitioned indexes as these have no storage,
> so
> your suggestion is a no-op?
What I meant is that if you do:
CREATE TABLE p(i INT, j INT) PARTITION BY RANGE (i);
CREATE TABLE p0 PARTITION OF p FOR VALUES FROM (00) TO (10);
CREATE TABLE p1 PARTITION OF p FOR VALUES FROM (10) TO (20);
CREATE INDEX p_idx ON p (i);
CREATE INDEX special_idx ON p0 (j);
GRANT MAINTAIN ON p TO foo;
\c - foo
REINDEX TABLE p;
That would reindex p0_i_idx and p1_i_idx, but skip special_idx. That
might be too confusing, but feels a bit more consistent permissions-
wise.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2023-06-21 16:29:54 | Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX |
Previous Message | James Coleman | 2023-06-21 16:17:45 | Re: Use of additional index columns in rows filtering |