mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 22:16:20 +00:00
@@ -22,6 +22,7 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
|
||||
|
||||
OUT queryid text,
|
||||
OUT query text,
|
||||
OUT relations text,
|
||||
OUT cmd_type text,
|
||||
OUT elevel int,
|
||||
OUT sqlcode int,
|
||||
@@ -58,8 +59,7 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
|
||||
OUT blk_write_time float8,
|
||||
OUT resp_calls text,
|
||||
OUT cpu_user_time float8,
|
||||
OUT cpu_sys_time float8,
|
||||
OUT tables_names text
|
||||
OUT cpu_sys_time float8
|
||||
)
|
||||
RETURNS SETOF record
|
||||
AS 'MODULE_PATHNAME', 'pg_stat_monitor'
|
||||
@@ -97,6 +97,7 @@ CREATE VIEW pg_stat_monitor AS SELECT
|
||||
'0.0.0.0'::inet + client_ip AS client_ip,
|
||||
queryid,
|
||||
query,
|
||||
(string_to_array(relations, ',')) relations,
|
||||
(string_to_array(cmd_type, ',')) cmd_type,
|
||||
elevel,
|
||||
sqlcode,
|
||||
@@ -128,8 +129,7 @@ CREATE VIEW pg_stat_monitor AS SELECT
|
||||
blk_write_time,
|
||||
(string_to_array(resp_calls, ',')) resp_calls,
|
||||
cpu_user_time,
|
||||
cpu_sys_time,
|
||||
(string_to_array(tables_names, ',')) tables_names
|
||||
cpu_sys_time
|
||||
FROM pg_stat_monitor(TRUE);
|
||||
|
||||
CREATE FUNCTION decode_error_level(elevel int)
|
||||
|
||||
Reference in New Issue
Block a user