Re: REINDEX and shared catalogs

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REINDEX and shared catalogs
Date: 2018-08-08 16:44:55
Message-ID: 20180808164455.GB13638@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 08, 2018 at 12:25:03PM +0530, Robert Haas wrote:
> In my opinion, the behavior change is probably OK, but not
> back-patchable.

Thanks. I see three votes in favor of not back-patching (you,
Horiguchi-san and Nathan), so that won't happen.

> I think that the documentation could be phrased more clearly. If I
> understand the proposed semantics, something like this might be about
> right:
>
> Reindexing a single index or table requires being the owner of that
> index or table. Reindexing a schema or database requires being the
> owner of that schema or database. Note that is therefore sometimes
> possible for non-superusers to rebuild indexes of tables owner by other
> users; however, as a special exception, when <command>REINDEX
> DATABASE</command> or <command>REINDEX SCHEMA</> is
> issued by a non-superuser, indexes on shared catalogs will be skipped
> unless the user owns the catalog (which typically won't be the case).
> Of course, superusers can always reindex anything.

I quite like what you are proposing here. I'll reuse that, I hope you
don't mind ;)
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2018-08-08 16:47:34 Re: [HACKERS] possible self-deadlock window after bad ProcessStartupPacket
Previous Message Michael Paquier 2018-08-08 16:42:29 Re: Temporary tables prevent autovacuum, leading to XID wraparound