From e069d210958842f95f60de386d912d0fe924630d Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Wed, 18 Feb 2026 15:57:15 +0100 Subject: [PATCH] fix: ignore setting `google_dataplex.max_messages` (#1261) * fix: ignore setting `google_dataplex.max_messages` Followup of https://github.com/prometheus-community/postgres_exporter/pull/1252 Ignore this setting altogether, as logging a warn at each scrape for a cloud provider specific entry seems a waste of resources. Signed-off-by: Cristian Greco * add comment Signed-off-by: Cristian Greco --------- Signed-off-by: Cristian Greco --- cmd/postgres_exporter/pg_setting.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/postgres_exporter/pg_setting.go b/cmd/postgres_exporter/pg_setting.go index e57f88391..6ed65f1cc 100644 --- a/cmd/postgres_exporter/pg_setting.go +++ b/cmd/postgres_exporter/pg_setting.go @@ -38,7 +38,11 @@ func querySettings(ch chan<- prometheus.Metric, server *Server) error { // // NOTE: If you add more vartypes here, you must update the supported // types in normaliseUnit() below - query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real') AND name != 'sync_commit_cancel_wait';" + // + // Settings intentionally ignored due to invalid format: + // - `sync_commit_cancel_wait`, specific to Azure Postgres, see https://github.com/prometheus-community/postgres_exporter/issues/523 + // - `google_dataplex.max_messages`, specific to Google Cloud SQL, see https://github.com/prometheus-community/postgres_exporter/issues/1240 + query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real') AND name NOT IN ('sync_commit_cancel_wait', 'google_dataplex.max_messages');" rows, err := server.db.Query(query) if err != nil {