Re: Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions
Date
Msg-id 20221121204539.wpfm2yntlhqr3jzk@alap3.anarazel.de
Whole thread Raw
In response to Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions  (sirisha chamarthi <sirichamarthi22@gmail.com>)
Responses Re: Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions
Re: Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions
List pgsql-hackers
Hi,

On 2022-11-21 00:16:20 -0800, sirisha chamarthi wrote:
> At present, calling pg_stat_reset* functions requires super user access
> unless explicitly grant execute permission on those. In this thread, I am
> proposing to grant execute on them to users with pg_monitor role
> permissions. This comes handy to the monitoring users (part of pg_monitor
> role) to capture the stats fresh and analyze. Do you see any concerns with
> this approach?

I think the common assumption is that a monitoring role cannot modify
the system, but this would change that. Normally a monitoring tool
should be able to figure out what changed in stats by comparing values
across time, rather than resetting stats.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Understanding WAL - large amount of activity from removing data
Next
From: Robert Haas
Date:
Subject: Re: Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions