PostgreSQL Prometheus Exporter fails: "column 'checkpoints_timed' does not exist" #31349
Labels
postgresql-ha
tech-issues
The user has a technical issue about an application
triage
Triage is needed
Name and Version
bitnami/postgresql-ha 15.1.5
What architecture are you using?
amd64
What steps will reproduce the bug?
Are you using any custom parameters or values?
What is the expected behavior?
The PostgreSQL Prometheus Exporter should correctly collect metrics from PostgreSQL database in version >=17 without errors. Queries executed by the exporter should only reference columns and views that exist in the connected database's version.
What do you see instead?
The exporter logs errors indicating that it is trying to query a non-existent column (checkpoints_timed) from the pg_stat_bgwriter view. This results in the failure of the stat_bgwriter collector and prevents the exporter from providing the corresponding metrics.
These errors did not occur when using PostgreSQL versions earlier than 17, suggesting that the issue is specific to PostgreSQL version 17 or a potential mismatch between the exporter and this version.
Log from postgre container:
Log from metrics container:
Additional information
This issue appears to have already been addressed in the Prometheus Community's postgres_exporter repository. Specifically, Pull Request #1072 implements changes to accommodate PostgreSQL version 17. The PR modifies the exporter to avoid referencing columns that no longer exist, such as checkpoints_timed, thereby resolving compatibility issues with this version.
The text was updated successfully, but these errors were encountered: