pg_stat_statements
The pg_stat_statements extension allows to trace the execution statistics of all queries. It is an essential extension in understanding the activity of a PostgreSQL cluster.
Last updated
The pg_stat_statements extension allows to trace the execution statistics of all queries. It is an essential extension in understanding the activity of a PostgreSQL cluster.
Last updated
Once the settings are configured, there is no further action required. Resetting pg_stat_statements is unnecessary.
Datasentinel collects activity metrics for all queries at regular intervals to allow detailed analyzes on the graphical interface.
This extension is part of the official PostgreSQL contrib package. Refer to the for more information
To be installed in the internal database named postgres
postgresql.conf
Add the following lines
You see lots of utility commands (other than SELECT, INSERT, UPDATE, DELETE) in pg_stat_statements,
Especially if you are using XA type distributed transactions, PREPARE TRANSACTION, COMMIT TRANSACTION, ROLLBACK TRANSACTION queries are not normalized by pg_stat_statements
You can disable their collect by setting this parameter:
connect as a superuser
connect to the internal database named postgres with superuser privileges
The Agent version 3.2, which was released in February 2023, introduces the feature allowing you to filter metrics collected from the extension