Skip to content

Commit c00d3fb

Browse files
committed
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.
1 parent 6f2f989 commit c00d3fb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

postgres_exporter.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ var queryOverrides = map[string]string{
227227
ON tmp.mode=tmp2.mode and pg_database.oid = tmp2.database ORDER BY 1`,
228228

229229
"pg_stat_replication": `
230-
SELECT *, pg_current_xlog_location(), pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float FROM pg_stat_replication
231-
INNER JOIN pg_replication_slots ON pg_stat_replication.pid=pg_replication_slots.active_pid`,
230+
SELECT *, pg_current_xlog_location(), pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float FROM pg_stat_replication`,
232231

233232
"pg_stat_activity": `
234233
SELECT

0 commit comments

Comments
 (0)