prometheus-community / prometheus-community/postgres_exporter
Error running query on database \"<database_host:port>\": pg_stat_statements pq: syntax error at or near \"e\"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Description
What did you do?
We deployed postgres exporter version 0.11.1 using official helm chart, and we are noticing below error in the exporter pod logs:
ts=2023-02-06T14:06:40.385Z caller=namespace.go:236 level=info err="Error running query on database \"<database_host:port>\": pg_stat_statements pq: syntax error at or near \"e\""
ts=2023-02-06T14:06:40.385Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_database_conflicts
ts=2023-02-06T14:06:40.392Z caller=namespace.go:193 level=debug msg="Querying namespa
What did you expect to see?
We expect to see regular metrices for pg_stat_statements
What did you see instead? Under which circumstances?
We keep seeing the error listed above in the pod logs
Environment
- Kubernetes cluster v1.24+
- postgres_exporter version: 0.11.1
- postgres_exporter flags: None
- PostgreSQL version: 13.7
- Logs:
“ts=2023-02-06T14:06:40.385Z caller=namespace.go:236 level=info err="Error running query on database \"<database_host:port>\": pg_stat_statements pq: syntax error at or near \"e\""
ts=2023-02-06T14:06:40.385Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_database_conflicts
ts=2023-02-06T14:06:40.392Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_replication
ts=2023-02-06T14:06:40.393Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_user_tables
ts=2023-02-06T14:06:40.448Z caller=collector.go:200 level=debug msg="collector succeeded" name=database duration_seconds=0.09150201
ts=2023-02-06T14:06:40.663Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_statio_user_tables
ts=2023-02-06T14:06:40.664Z caller=namespace.go:236 level=info err="Error running query on database \"<database_host:port>\": pg_statio_user_tables pq: column \"toast_blks_re\" does not exist"
ts=2023-02-06T14:06:40.664Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_database”
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported errors with postgres_exporter 0.11.1 and PostgreSQL 13.7, then inspect the query handling referenced at namespace.go:193 and namespace.go:236 for pg_stat_statements and pg_statio_user_tables. Done means those namespaces produce regular metrics without the reported syntax or missing-column errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100