Skip to content

pg_stat_statements for postgres 13 does not contain: total_time, min_time, max_time, mean_time, stddev_time columns that cause errors #541

Closed
@zagr0

Description

@zagr0

What did you do?
run postgres_exporter for postgresql 13 server

What did you expect to see?
to not have errors and all the metrics should be returned

What did you see instead? Under which circumstances?
there are failures during metrics scraping
pg_stat_statements for postgres 13 does not contain: total_time, min_time, max_time, mean_time, stddev_time columns
https://www.postgresql.org/docs/13/pgstatstatements.html

Environment

  • postgres_exporter version:

postgres_exporter 0.0.1-rev (built with go1.15.8)

  • PostgresSQL version:

13.2.0

  • Logs:
time="2021-06-08T17:02:01Z" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1850"
time="2021-06-08T17:02:31Z" level=info msg="Established new database connection to \"*****:5432\"." source="postgres_exporter.go:983"
time="2021-06-08T17:02:31Z" level=info msg="Semantic Version Changed on \"*****:5432\": 0.0.0 -> 13.2.0" source="postgres_exporter.go:1552"
time="2021-06-08T17:02:31Z" level=info msg="Error running query on database \"******:5432\": pg_stat_statements pq: column \"total_time\" does not exist" source="postgres_exporter.go:1503"
time="2021-06-08T17:02:31Z" level=error msg="queryNamespaceMappings returned 1 errors" source="postgres_exporter.go:1621"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions