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.
This commit is contained in:
Will Rouesnel 2016-11-17 00:16:21 +11:00
parent 6f2f9890f7
commit c00d3fb6e7

View File

@ -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