# Minimum grant that PMM requires for monitoring postgres with pg\_stat\_monitor

**URL:** <https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637>\
**Category:** pg\_stat\_monitor\
**Created:** [February 22, 2024, 3:04am UTC](https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637 "2024-02-22T03:04:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rithesh\_Sellercraft](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rithesh_sellercraft/32/15194_2.png) [@Rithesh\_Sellercraft](https://forums.percona.com/u/Rithesh_Sellercraft)\
**Post date:** [February 22, 2024, 3:04am UTC](https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637/1 "2024-02-22T03:04:55Z")

</div>

## Description:

What are the minimum GRANTs required for the PMM database account? The docs don’t seem to mention this anywhere

> **[Percona Monitoring and Management](https://docs.percona.com/percona-monitoring-and-management/3/404.html)**
>
> Documentation

---

<div class="post-metadata">

**Author:** ![Charly\_Batista](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/charly_batista/32/1242_2.png) [@Charly\_Batista](https://forums.percona.com/u/Charly_Batista)\
**Post date:** [February 22, 2024, 5:42pm UTC](https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637/2 "2024-02-22T17:42:55Z")

</div>

Hi @Rithesh_Sellercraft ,

Granting `pg_monitor` to the user should be enough as `pg_stat_monitor` forks from `pg_stat_statement` and checking Postgres documentation it says:

`For security reasons, only superusers and roles with privileges of the **pg_read_all_stats** role are allowed to see the SQL text and queryid of queries executed by other users. Other users can see the statistics, however, if the view has been installed in their database.`

and `pg_monitor` member of the `pg_read_all_stats` role:  
`pg_monitor: Read/execute various monitoring views and functions. This role is a member of pg_read_all_settings, pg_read_all_stats and pg_stat_scan_tables.`

I’ve report a bug asking to double check and update the documentation. You can find it here [Percona Monitoring and Management - Issues - Percona JIRA](https://perconadev.atlassian.net/jira/software/c/projects/PMM/issues/PMM-12963).

Regards,

Charly

---

<div class="post-metadata">

**Author:** ![Rithesh\_Sellercraft](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rithesh_sellercraft/32/15194_2.png) [@Rithesh\_Sellercraft](https://forums.percona.com/u/Rithesh_Sellercraft)\
**Post date:** [February 22, 2024, 6:34pm UTC](https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637/3 "2024-02-22T18:34:51Z")

</div>

Thank you for the information.

---

<div class="post-metadata">

**Author:** ![siddharth0204](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@siddharth0204](https://forums.percona.com/u/siddharth0204)\
**Post date:** [February 3, 2025, 12:49pm UTC](https://forums.percona.com/t/minimum-grant-that-pmm-requires-for-monitoring-postgres-with-pg-stat-monitor/28637/4 "2025-02-03T12:49:50Z")

</div>

Is it possible to create only a read only user and grant pg\_monitor role to monitor Postgresql database using PMM?  
Please let me know

Thanks and Regards  
Siddharth
