Percona PMM tool giving performance issues on Prod environments

hello,

Thanks for helping out on our issues.
Recently when using PMM for our postgresql instance, we saw significant performance issue that took a toll on performance of the database because of below sql fired by PMM and we had to disable Percona service immediately

SELECT
current_database() datname,
schemaname,
relname,
seq_scan,
seq_tup_read,
idx_scan,
idx_tup_fetch,
n_tup_ins,
n_tup_upd,
n_tup_del,
n_tup_hot_upd,
n_live_tup,
n_dead_tup,
n_mod_since_analyze,
COALESCE(last_vacuum, ‘1970-01-01Z’) as last_vacuum,
COALESCE(last_autovacuum, ‘1970-01-01Z’) as last_autovacuum,
COALESCE(last_analyze, ‘1970-01-01Z’) as last_analyze,
COALESCE(last_autoanalyze, ‘1970-01-01Z’) as last_autoanalyze,
vacuum_count,
autovacuum_count,
analyze_count,
autoanalyze_count
FROM
pg_stat_user_tables

How can we take care of the above issue. Has anybody faced this issue before

TIA

Thanks and Regards,
Siddharth

Hello @siddharth0204, what version of PMM? We have fixed many query-related issues in the past 2 years. Make sure you are on the latest version of PMM2.

hi Matthew,

Thanks for the response
WE are using version PMMVersion: 2.41.1
Does this version have the fixes you are talking about

Regards
Siddharth

This query is a ‘custom’ query that we pre-install.

You can remove it if you’d like.

Hi, no, your version doesn’t include fix. Please update to the latest version.

Thanks Matthew,

Could you please let us know steps to remove this query from getting executed

Regards,
Siddharth

There should be few files in /usr/local/percona/pmm/collectors/custom-queries/postgresql, please find this query there and comment or remove yaml structure related to it.