1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-12 14:02:47 +03:00

Merge pull request #587 from credativ/azure-ff-fix

Avoid parsing error from bogus Azure Flexible Server custom GUC
This commit is contained in:
Joe Adams
2022-02-09 15:30:32 -05:00
committed by GitHub

View File

@@ -31,7 +31,7 @@ func querySettings(ch chan<- prometheus.Metric, server *Server) error {
// //
// NOTE: If you add more vartypes here, you must update the supported // NOTE: If you add more vartypes here, you must update the supported
// types in normaliseUnit() below // types in normaliseUnit() below
query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real');" query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real') AND name != 'sync_commit_cancel_wait';"
rows, err := server.db.Query(query) rows, err := server.db.Query(query)
if err != nil { if err != nil {