On 10/24/21, 11:13 PM, "Jeff Davis" <pgsql@j-davis.com> wrote:
> On Sun, 2021-10-24 at 21:32 +0000, Bossart, Nathan wrote:
>> My initial reaction was that members of pg_maintenance should be able
>> to do all of these things (VACUUM, ANALYZE, CLUSTER, REINDEX, and
>> CHECKPOINT).
>
> What about REFRESH MATERIALIZED VIEW? That seems more specific to a
> workload, but it's hard to draw a clear line between that and CLUSTER.
Hm. CLUSTER reorders the content of a table but does not change it.
REFRESH MATERIALIZED VIEW, on the other hand, does replace the
content. I think that's the sort of line I'd draw between REFRESH
MATERIALIZED VIEW and the other commands as well, so I'd leave it out
of pg_maintenance.
Nathan