From: Jeff Davis <pgsql@j-davis.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: Ted Yu <yuzhihong@gmail.com>
Cc: Pavel Luzanov <p.luzanov@postgrespro.ru>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Date: Wed, 21 Jun 2023 09:26:09 -0700
Message-ID: <d2eefebb5482be267dc19c07578257067dbd3ae9.camel@j-davis.com> (raw)
In-Reply-To: <ZJIuACTWxMFikGP8@paquier.xyz>
References: <20230613211246.GA219055@nathanxps13>
<ZIj4v1CwqlDVJZfB@paquier.xyz>
<20230613235442.GA222795@nathanxps13>
<20230614181711.GA488295@nathanxps13>
<ZIpfack6qJUHaw+g@paquier.xyz>
<20230615041044.GA736001@nathanxps13>
<20230615235700.GA877311@nathanxps13>
<20230616052025.GA1026700@nathanxps13>
<20230619215534.GA442477@nathanxps13>
<edf8dc01333f4b3355aa91001cb26029cab1eb2e.camel@j-davis.com>
<ZJIuACTWxMFikGP8@paquier.xyz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, michael@paquier.xyz, nathandbossart@gmail.com, yuzhihong@gmail.com, p.luzanov@postgrespro.ru, pryzby@telsasoft.com
Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
In-Reply-To: <d2eefebb5482be267dc19c07578257067dbd3ae9.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox