From c00d3fb6e7d71c87b27d5a59f795ab57663ad2ae Mon Sep 17 00:00:00 2001 From: Will Rouesnel <w.rouesnel@gmail.com> Date: Thu, 17 Nov 2016 00:16:21 +1100 Subject: [PATCH] Revert PR #23 which broke replication stats. This PR is not general to all versions of postgres, and in the worst case meant the query returned nothing. Closes #30 and shows we need a test case. --- postgres_exporter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/postgres_exporter.go b/postgres_exporter.go index 17a289c4..6c66d06b 100644 --- a/postgres_exporter.go +++ b/postgres_exporter.go @@ -227,8 +227,7 @@ var queryOverrides = map[string]string{ ON tmp.mode=tmp2.mode and pg_database.oid = tmp2.database ORDER BY 1`, "pg_stat_replication": ` - SELECT *, pg_current_xlog_location(), pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float FROM pg_stat_replication - INNER JOIN pg_replication_slots ON pg_stat_replication.pid=pg_replication_slots.active_pid`, + SELECT *, pg_current_xlog_location(), pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float FROM pg_stat_replication`, "pg_stat_activity": ` SELECT