Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT. - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Date
Msg-id CAKFQuwYnUFye3Qmi57B7AcyVx70w34F7ThJKo50BxsWvC_bn5Q@mail.gmail.com
Whole thread Raw
In response to Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Sun, Oct 24, 2021 at 7:49 AM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
On Sun, Oct 24, 2021 at 3:15 AM Jeff Davis <pgsql@j-davis.com> wrote:
>
> Add new predefined role pg_maintenance, which can issue VACUUM,
> ANALYZE, CHECKPOINT.


Are there any other database activities that fall under the
"maintenance" category? How about CLUSTER, REINDEX? I didn't check the
code for their permissions.


I would not lump the I/O intensive cluster and reindexing commands, and vacuum full, into the same permission bucket as vacuum and analyze.  Checkpoint fits in the middle of that continuum.  However, given that both vacuum and analyze are run to ensure good planner statistics during normal usage of the database, while the others, including checkpoint, either are non-normal usage or don't influence the planner, I would shift checkpoint to the same permission that covers cluster and reindex.

David J.

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Next
From: Jeff Davis
Date:
Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().