# Query plan is not displayed for postgres13 database

**URL:** <https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894>\
**Category:** PMM 2.x\
**Tags:** pmm, postgres, postgresql\
**Created:** [October 7, 2022, 4:59am UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894 "2022-10-07T04:59:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghunath.dhandapani](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@raghunath.dhandapani](https://forums.percona.com/u/raghunath.dhandapani)\
**Post date:** [October 7, 2022, 4:59am UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/1 "2022-10-07T04:59:27Z")

</div>

Hi Folks,

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

Kind Regards,  
Raghu

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [October 7, 2022, 2:56pm UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/2 "2022-10-07T14:56:15Z")

</div>

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](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/postgresql.html#pg_stat_monitor) 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.

---

<div class="post-metadata">

**Author:** ![raghunath.dhandapani](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@raghunath.dhandapani](https://forums.percona.com/u/raghunath.dhandapani)\
**Post date:** [October 7, 2022, 3:11pm UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/3 "2022-10-07T15:11:51Z")

</div>

> [@steve.hoffman](#):
>
> –query-source=pgstatmonitor

Thank you Steve, I have added the pg\_stat\_monitor extension in the postgresql server, but i didn’t explicitly mention --query-source=pgstatmonitor while adding the client.

I used the below commands.

```auto
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:<password>@pmm.example.com

sudo pmm-admin add postgresql --username='pmm' --password=<password>

```

So , i need to use the command like below?

`sudo pmm-admin add postgresql --username='pmm' --password=<password> --query-source=pgstatmonitor`

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [October 7, 2022, 3:19pm UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/4 "2022-10-07T15:19:27Z")

</div>

Yes! If you first need to remove the node from monitoring to re-add it:

`pmm-admin remove postgresql <service name>`

you can get the service name by typing `pmm-admin list`

Then re-add with the command above. you’ll only have a small gap in metrics while you removed/re-added.

---

<div class="post-metadata">

**Author:** ![Yuvaraj\_64](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yuvaraj_64/32/6670_2.png) [@Yuvaraj\_64](https://forums.percona.com/u/Yuvaraj_64)\
**Post date:** [October 16, 2022, 7:23am UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/5 "2022-10-16T07:23:40Z")

</div>

Hi Steve,

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

-Siddesh

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [October 17, 2022, 12:12pm UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/6 "2022-10-17T12:12:18Z")

</div>

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](https://docs.percona.com/postgresql/13/pg-stat-monitor.html#changing-the-configuration) and you can see how to set the value [here](https://docs.percona.com/pg-stat-monitor/configuration.html#pg_stat_monitorpgsm_enable_query_plan). Note that this config changes requires a postgres restart to take effect.

---

<div class="post-metadata">

**Author:** ![raghunath.dhandapani](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@raghunath.dhandapani](https://forums.percona.com/u/raghunath.dhandapani)\
**Post date:** [October 31, 2022, 9:40am UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/7 "2022-10-31T09:40:15Z")

</div>

> [@steve.hoffman](#):
>
> postgresql server

It worked, thank you @steve.hoffman

---

<div class="post-metadata">

**Author:** ![aniketwalke](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@aniketwalke](https://forums.percona.com/u/aniketwalke)\
**Post date:** [October 8, 2024, 7:27am UTC](https://forums.percona.com/t/query-plan-is-not-displayed-for-postgres13-database/17894/8 "2024-10-08T07:27:18Z")

</div>

Hi i am facing the same issue i have followed everything to the book enabling the monitor extension and all and enabling all the parameters related to it but still i am not able to see the plan i am using 14.1 postgres any leads ?
