Re: add \dpS to psql

Pavel Luzanov <p.luzanov@postgrespro.ru>

From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: Isaac Morland <isaac.morland@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2022-12-08T11:03:43Z
Lists: pgsql-hackers
On 08.12.2022 07:48, Isaac Morland wrote:
> If we implement MAINTAIN to control access to VACUUM, ANALYZE, 
> REFRESH, CLUSTER, and REINDEX, we will cover everything that I can 
> find that has seriously discussed on this list

I like this approach with MAINTAIN privilege. I'm trying to find any 
disadvantages ... and I can't.

For the complete picture, I tried to see what other actions with the 
table could *potentially* be considered as maintenance.
Here is the list:

- create|alter|drop on extended statistics objects
- alter table|index alter column set statistics
- alter table|index [re]set (storage_parameters)
- alter table|index set tablespace
- alter table alter column set storage|compression
- any actions with the TOAST table that can be performed separately from 
the main table

I have to admit that the discussion has moved away from the $subject.

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix psql \?'s entries for \dp and \z.

  2. psql: Add support for \dpS and \zS.

  3. Add grantable MAINTAIN privilege and pg_maintain role.