I have installed PMM2 recently and added a target ubuntu machine which runs postgreSQL13, Installation went fine, i can see other statistics but not the query plan. When clicking on the plan tab, i am getting the below message.
“No plan found”
Do anyone faced this issue before?
The below extensions are present in the database
pg_stat_statements & pg_stat_monitor
What command did you use to add the client? the Examples and Plan tabs will only work if pg_stat_monitor is enabled on the postgresql server but you also have to explicitly add the node to PMM setting pg_stat_mon as the query-source with the --query-source=pgstatmonitor or it will default to pg_stat_statements with more limited output.
I have created the pg_stat_monitor extension and able to see metrics collected from database. I have removed postgresql service and re-added with
pmm-admin add postgresql --username=‘postgres’ --password=xxxx --query-source=pgstatmonitor
But, Still I am unable to see query plan from QAN
Just got a response from one of the devs and he said it’s disabled by default as it adds some load to the system to capture this which may not be desired in all environments. you can get more detail about the configuration options here and you can see how to set the value here. Note that this config changes requires a postgres restart to take effect.