Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Date: 2021-10-24 16:47:37
Message-ID: CAKFQuwYnUFye3Qmi57B7AcyVx70w34F7ThJKo50BxsWvC_bn5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 24, 2021 at 7:49 AM Bharath Rupireddy <
bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:

> On Sun, Oct 24, 2021 at 3:15 AM Jeff Davis <pgsql(at)j-davis(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2021-10-24 16:50:58 Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().
Previous Message Bharath Rupireddy 2021-10-24 14:49:24 Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.