Support server and database statistics on Greenplum. Fixes #3004

This commit is contained in:
Joao Pedro De Almeida Pereira
2018-01-12 10:02:46 +00:00
committed by Dave Page
parent c32eb6bd37
commit ed3e374df6
2 changed files with 2 additions and 13 deletions

View File

@@ -4,8 +4,6 @@ SELECT
datname AS {{ conn|qtIdent(_('Database')) }},
backend_start AS {{ conn|qtIdent(_('Backend start')) }},
CASE
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
@@ -26,11 +24,9 @@ UNION
SELECT
procpid AS "PID",
usename AS {{ conn|qtIdent(_('User')) }},
datname AS {{ conn|qtIdent(_('Database')) }},
'' AS {{ conn|qtIdent(_('Database')) }},
backend_start AS {{ conn|qtIdent(_('Backend start')) }},
CASE
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
@@ -38,7 +34,7 @@ SELECT
ELSE
'localhost:' || client_port
END AS {{ conn|qtIdent(_('Client')) }},
{{ _('Streaming Replication') }}|qtLiteral AS {{ conn|qtIdent(_('Application')) }},
{{ _('Streaming Replication')|qtLiteral }} AS {{ conn|qtIdent(_('Application')) }},
null AS {{ conn|qtIdent(_('Waiting?')) }},
state || ' [sync (state: ' || COALESCE(sync_state, '') || ', priority: ' || sync_priority::text || ')] (' || sent_location || ' sent, ' || write_location || ' written, ' || flush_location || ' flushed, ' || replay_location || ' applied)' AS {{ conn|qtIdent(_('Query')) }},
null AS {{ conn|qtIdent(_('Query start')) }},