Re: fix and document CLUSTER privileges
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2022-12-14T17:34:35Z
Lists: pgsql-hackers
Attachments
- fix_cluster_privs_v2.patch (text/x-diff) patch v2
On Thu, Dec 08, 2022 at 04:08:40PM -0500, Robert Haas wrote: > On Thu, Dec 8, 2022 at 1:13 PM Nathan Bossart <nathandbossart@gmail.com> wrote: >> Currently, CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX (minus REINDEX >> SCHEMA|DATABASE|SYSTEM) require ownership of the relation or superuser. In >> fact, all three use the same RangeVarCallbackOwnsTable() callback function. >> My current thinking is that this is good enough. I don't sense any strong >> demand for allowing database owners to run these commands on all non-shared >> relations, and there's ongoing work to break out the privileges to GRANT >> and predefined roles. > > +1. > > I don't see why being the database owner should give you the right to > run a random subset of commands on any table in the database. Tables > have their own system for access privileges; we should use that, or > extend it as required. Here is a rebased version of the patch. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Clarify documentation for CLUSTER on partitioned tables.
- 8b5f36bb6c16 16.0 landed
-
Fix MAINTAIN privileges for toast tables and partitions.
- ff9618e82a46 16.0 cited
-
Have CLUSTER ignore partitions not owned by caller
- 3f19e176ae0f 15.0 cited