mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
PG-176 : Extract fully qualified relations name.
This commit is contained in:
35
expected/guc.out
Normal file
35
expected/guc.out
Normal file
@@ -0,0 +1,35 @@
|
||||
CREATE EXTENSION pg_stat_monitor;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select pg_sleep(.5);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT * FROM pg_stat_monitor_settings;
|
||||
name | value | default_value | description | minimum | maximum | restart
|
||||
----------------------------------------+--------+---------------+----------------------------------------------------------------------------------------------------------+---------+------------+---------
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | 1
|
||||
pg_stat_monitor.pgsm_query_max_len | 1024 | 1024 | Sets the maximum length of query. | 1024 | 2147483647 | 1
|
||||
pg_stat_monitor.pgsm_enable | 1 | 1 | Enable/Disable statistics collector. | 0 | 0 | 0
|
||||
pg_stat_monitor.pgsm_track_utility | 0 | 0 | Selects whether utility commands are tracked. | 0 | 0 | 0
|
||||
pg_stat_monitor.pgsm_normalized_query | 1 | 1 | Selects whether save query in normalized format. | 0 | 0 | 0
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | 1
|
||||
pg_stat_monitor.pgsm_bucket_time | 300 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | 1
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | 1
|
||||
pg_stat_monitor.pgsm_histogram_max | 100000 | 10 | Sets the time in millisecond. | 10 | 2147483647 | 1
|
||||
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 2147483647 | 1
|
||||
(10 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
DROP EXTENSION pg_stat_monitor;
|
||||
34
expected/relations.out
Normal file
34
expected/relations.out
Normal file
@@ -0,0 +1,34 @@
|
||||
CREATE EXTENSION pg_stat_monitor;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
CREATE TABLE foo1(a int);
|
||||
CREATE TABLE foo2(a int);
|
||||
CREATE TABLE foo3(a int);
|
||||
CREATE TABLE foo4(a int);
|
||||
SELECT * FROM foo1, foo2, foo3, foo4;
|
||||
a | a | a | a
|
||||
---+---+---+---
|
||||
(0 rows)
|
||||
|
||||
SELECT query, relations from pg_stat_monitor;
|
||||
query | relations
|
||||
--------------------------------------+---------------------------------------------------
|
||||
SELECT * FROM foo1, foo2, foo3, foo4 | {public.foo1,public.foo2,public.foo3,public.foo4}
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
(2 rows)
|
||||
|
||||
DROP TABLE foo1;
|
||||
DROP TABLE foo2;
|
||||
DROP TABLE foo3;
|
||||
DROP TABLE foo4;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
DROP EXTENSION pg_stat_monitor;
|
||||
34
expected/relations_1.out
Normal file
34
expected/relations_1.out
Normal file
@@ -0,0 +1,34 @@
|
||||
CREATE EXTENSION pg_stat_monitor;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
CREATE TABLE foo1(a int);
|
||||
CREATE TABLE foo2(a int);
|
||||
CREATE TABLE foo3(a int);
|
||||
CREATE TABLE foo4(a int);
|
||||
SELECT * FROM foo1, foo2, foo3, foo4;
|
||||
a | a | a | a
|
||||
---+---+---+---
|
||||
(0 rows)
|
||||
|
||||
SELECT query, relations from pg_stat_monitor;
|
||||
query | relations
|
||||
--------------------------------------+---------------------------------------------------
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
SELECT * FROM foo1, foo2, foo3, foo4 | {public.foo1,public.foo2,public.foo3,public.foo4}
|
||||
(2 rows)
|
||||
|
||||
DROP TABLE foo1;
|
||||
DROP TABLE foo2;
|
||||
DROP TABLE foo3;
|
||||
DROP TABLE foo4;
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
DROP EXTENSION pg_stat_monitor;
|
||||
Reference in New Issue
Block a user