missing data for a few graphs when the PostgreSQL server only has the default Postgres database, and there is no other user-created database.
Description
How to test
Configure PMM 2.43.2 and PostgreSQL-16.
make sure postgresql only has default databases as below,
[postgres@node0 ~]$ psql
psql (16.6 - Percona Distribution)
Type "help" for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-----------+----------+----------+-----------------+---------+---------+------------+-----------+-----------------------
postgres | postgres | UTF8 | libc | C.UTF-8 | C.UTF-8 | | |
template0 | postgres | UTF8 | libc | C.UTF-8 | C.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | C.UTF-8 | C.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(3 rows)
postgres=# \dx
List of installed extensions
Name | Version | Schema | Descript
ion
--------------------+---------+------------+--------------------------------------
----------------------------------
pg_stat_statements | 1.10 | public | track planning and execution statisti
cs of all SQL statements executed
plpgsql
Add postgresql tp pmm monitoring,
[root@node0 /]# pmm-admin add postgresql pgsql16 --username=pmm --password=pmmPWD 127.0.0.1:5432
PostgreSQL Service added.
Service ID : /service_id/ba239eaa-dc49-499e-9076-08929dff9a28
Service name: pgsql16
Warning: Could not to detect the pg_stat_monitor extension on your system. Falling back to the pg_stat_statements.
[root@node0 /]# pmm-admin list
Service type Service name Address and port Service ID
PostgreSQL pgsql16 127.0.0.1:5432 /service_id/ba239eaa-dc49-499e-9076-08929dff9a28
Agent type Status Metrics Mode Agent ID Service ID Port
pmm_agent Connected /agent_id/5a2e0a84-6828-4812-af5e-07f20391ef03 0
node_exporter Running push /agent_id/e839a3de-e844-480e-ac67-32ca72e26601 42001
postgres_exporter Running push /agent_id/079d8b95-44c9-4e51-9d58-2b9998126e18 /service_id/ba239eaa-dc49-499e-9076-08929dff9a28 42002
postgresql_pgstatements_agent Running /agent_id/34aaa703-6515-4d36-b795-09bc12aad9b1 /service_id/ba239eaa-dc49-499e-9076-08929dff9a28 0
vmagent Running push /agent_id/42eb7639-c8e2-43fc-9cd6-135d9245cf9e 42000
[root@node0 /]#
We can see in the below screeshorts a few graphs with no data in PostgreSQL Instance Summary,
Let's add some data to postgres using pgbench,
[postgres@node0 ~]$ /usr/pgsql-16/bin/pgbench -i -s 50 postgres
[postgres@node0 ~]$ /usr/pgsql-16/bin/pgbench -c 5 -j 2 -t 10000 postgres
It's still the same, with few graphs with no data.
QAN is working fine, and we can see pgbench queries,
Workaround:
Create database,
postgres=# create database db1;
CREATE DATABASE
postgres=# exit
and graphs will start showing data.
Example:
How to document
AFFECTED CS IDs
Attachments
- 11 Dec 2024, 03:19 PM
- 11 Dec 2024, 11:29 AM
- 11 Dec 2024, 11:29 AM
- 11 Dec 2024, 11:29 AM
- 11 Dec 2024, 11:29 AM
- 11 Dec 2024, 11:29 AM
- 11 Dec 2024, 11:29 AM
duplicates
Activity
Lalit Choudhary December 11, 2024 at 3:19 PM
@Roma Novikov The FR feature is about “Remove exclusion of default PG database (postgres) from filters on dashboards.”
currently, we don’t see the Postgres database in the DB filter list, so yes, FR should fix this issue.
Thanks.
Roma Novikov December 11, 2024 at 1:30 PM
@Lalit Choudhary pls check the ^ and feature build for it. IS this solved the problem?
Roma Novikov December 11, 2024 at 11:21 AM
This will be changed in pmm v3 - https://perconadev.atlassian.net/browse/PMM-13550
Details
Details
Assignee
Reporter
Priority
Components
Labels
Needs QA
Needs Doc
Affects versions
Environment
Issue: When the postgresql server only has the default postgres database and there is no other database, few pmm graphs not showing data for Postgresql monitoring.
E
Smart Checklist
Open Smart Checklist
Smart Checklist

Issue: When the PostgreSQL server only has the default Postgres database, and there is no other user-created database, few pmm postgresql graphs do not show data. Just creating an empty database will fix the issue and graphs will start showing data.
Tested with PMM 2.43.2 and PostgreSQL-16.