postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

bug

Open notionev opened this issue 3 years ago • 1 comments

err="Error running query on database "ssssss:5432": pg_stat_statements pq: column "total_time" does not exist"

notionev avatar Sep 22 '21 06:09 notionev

Without any further information, I'd assume this is from the queries.yaml pg_stat_statements section, which still uses the "old" column names that were valid up to PostgreSQL 12. From PostgreSQL 13 onward, some of the column names need to be adjusted, they are now called "total_exec_time", "min_exec_time", etc.

Please also note that adding the pg_stat_statements section can (and on most database probably will) introduce very high cardinality because for each query pattern, there will be a corresponding set of metrics. If you are not 100% sure you need those metrics, you should probably drop the section from your user queries. There is even a pull request open to add a warning to the docs about this: https://github.com/prometheus-community/postgres_exporter/pull/561

Also, as a side note, just using "bug" as a title and a single lien of output for the description is probably not the fastest way to get help or feedback from a project.

mbra avatar Oct 31 '21 07:10 mbra