Usage of pg_stat_monitor by default

Description

Right now PMM uses pg_stat_statements by default and not pg_stat_monitor (PGSM)

PMM should use PGSM by default whenever it is available on the hosts and as a "fallback" option pg_stat_statements in case PGSM is not present/installed on the hosts.

DoD:

PGSM is the default and pg_stat_statements is the fallback in case PGSM does not exist. 

 

Out of scope

  • Add warning message in PMM UI Inventory about fallback from PGSM to PGSS due to missing PGSM.

How to test

With PGSM extension available
1. Add PostgreSQL to monitoring by pmm-admin without flag query-source.
2. Check that it used pgstatmonitor, not pgstatstatements.

Without PGSM extension available

  1. Add PostgreSQL to monitoring by pmm-admin without flag query-source.

  2. Check that it used pgstatstatements.

How to document

None

Attachments

1

Activity

Show:

Jiří Čtvrtka 
February 2, 2024 at 12:12 PM

Based on SP everyone missed that including me :(. My fault. I will take a look how much work it will take to fix it.

Roma Novikov 
February 2, 2024 at 11:58 AM

It looks like at the end we made this improvement in not expected way.
DOD condition not met and there is no wall back option. we just changed the default (

Jiří Čtvrtka 
March 9, 2023 at 1:27 PM

Merged. I am keeping it here, because I still need prepare doc.

Ihor Cherkasov 
March 7, 2023 at 12:45 PM
(edited)

Verified on FB: https://github.com/Percona-Lab/pmm-submodules/pull/3115#issuecomment-1457996645

Now I see that postgresql_pgstatmonitor_agent is added if --query-source flag is not set

Added 0.25 story points for testing purposes.

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Needs Doc

Planned Version/s

Fix versions

Story Points

Smart Checklist Progress

Created October 27, 2022 at 9:44 PM
Updated January 22, 2025 at 7:47 AM
Resolved March 14, 2023 at 2:43 PM