PG-544: Regression cleanup.

This commit is contained in:
Ibrar Ahmed
2022-11-16 19:47:07 +00:00
parent 7f743b142a
commit a3830624bb
32 changed files with 138 additions and 9876 deletions

View File

@@ -5,128 +5,40 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings;
name | value | default_value | description | minimum | maximum | options | 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 | | yes
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
pg_stat_monitor.pgsm_track_planning | yes | no | Selects whether planning statistics are tracked. | | | yes, no | no
(15 rows)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_track_planning';
name | value | default_value | description | minimum | maximum | options | restart
-------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_planning | yes | no | Selects whether planning statistics are tracked. | | | yes, no | no
(1 row)
SELECT * from pg_stat_monitor_settings;
name | value | default_value | description | minimum | maximum | options | 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 | | yes
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
pg_stat_monitor.pgsm_track_planning | yes | no | Selects whether planning statistics are tracked. | | | yes, no | no
(15 rows)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_track_planning';
name | value | default_value | description | minimum | maximum | options | restart
-------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_planning | yes | no | Selects whether planning statistics are tracked. | | | yes, no | no
(1 row)
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor;
query | calls | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time
---------------------------------------------------------------------------------------------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
SELECT * from pg_stat_monitor_settings | 2 | 0.2432 | 0.1214 | 0.1219 | 0.1216 | 0.0002
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor | 1 | 1.4538 | 1.4538 | 1.4538 | 1.4538 | 0
(3 rows)
select substr(query, 0,100) as query, calls, total_plan_time, min_plan_time,max_plan_time,mean_plan_time,stddev_plan_time from pg_stat_monitor order by query;
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings;
name | value | default_value | description | minimum | maximum | options | 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 | | yes
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
(15 rows)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_track_planning';
name | value | default_value | description | minimum | maximum | options | restart
-------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
(1 row)
SELECT * from pg_stat_monitor_settings;
name | value | default_value | description | minimum | maximum | options | 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 | | yes
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
(15 rows)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_track_planning';
name | value | default_value | description | minimum | maximum | options | restart
-------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
(1 row)
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor;
query | calls | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time
---------------------------------------------------------------------------------------------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
<<<<<<< HEAD
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor | 1 | 0 | 0 | 0 | 0 | 0
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
SELECT * from pg_stat_monitor_settings | 2 | 0 | 0 | 0 | 0 | 0
=======
SELECT * from pg_stat_monitor_settings | 2 | 0 | 0 | 0 | 0 | 0
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor | 1 | 0 | 0 | 0 | 0 | 0
>>>>>>> origin/REL_1_STABLE
(3 rows)
select substr(query, 0,100) as query, calls, total_plan_time, min_plan_time,max_plan_time,mean_plan_time,stddev_plan_time from pg_stat_monitor order by query;
query | calls | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time
-----------------------------------------------------------------------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
SELECT * from pg_stat_monitor_settings | 2 | 0 | 0 | 0 | 0 | 0
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_tim | 1 | 0 | 0 | 0 | 0 | 0
select (max_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
select (mean_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
select (min_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
select (stddev_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
select (total_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
select substr(query, 0,100) as query, calls, total_plan_time, min_plan_time,max_plan_time,mean_plan | 1 | 0 | 0 | 0 | 0 | 0
(9 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------

View File

@@ -23,8 +23,7 @@ SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_extract_comments' |
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/ | /* First comment */, /* Second comment*/
SELECT pg_stat_monitor_reset() |
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
(4 rows)
(3 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
@@ -50,7 +49,6 @@ SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_extract_comments' |
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/ |
SELECT pg_stat_monitor_reset() |
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
(4 rows)
(3 rows)
Drop extension pg_stat_monitor;

View File

@@ -75,7 +75,6 @@ select substr(query, 0,50) as query, calls, query_plan from pg_stat_monitor orde
SELECT key, txt_0, value_0 FROM TBL_0 | 2 |
SELECT pg_stat_monitor_reset() | 1 |
UPDATE TBL_0 SET value_0 = 1681692777 | 1 |
select substr(query, 0,50) as query, calls, query | 1 |
(7 rows)
(6 rows)
Drop extension pg_stat_monitor;

View File

@@ -1,114 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_shared_buffer';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------------+-------+---------------+-------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_query_shared_buffer | 1 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
(1 row)
CREATE database example;
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
---------+---------------------------------------------------------------------------------------------------------------+-------
example | BEGIN | 10000
example | END | 10000
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP) | 10000
example | SELECT abalance FROM pgbench_accounts WHERE aid = $1 | 10000
example | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2 | 10000
example | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2 | 10000
example | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 | 10000
example | alter table pgbench_accounts add primary key (aid) | 1
example | alter table pgbench_branches add primary key (bid) | 1
example | alter table pgbench_tellers add primary key (tid) | 1
example | begin | 1
example | commit | 1
example | copy pgbench_accounts from stdin | 1
example | create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) | 1
example | create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) | 1
example | create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) | 1
example | create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) | 1
example | drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1
example | insert into pgbench_branches(bid,bbalance) values($1,$2) | 100
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 1000
(20 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_shared_buffer';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------------+-------+---------------+-------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_query_shared_buffer | 100 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
---------+---------------------------------------------------------------------------------------------------------------+-------
example | BEGIN | 10000
example | END | 10000
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP) | 10000
example | SELECT abalance FROM pgbench_accounts WHERE aid = $1 | 10000
example | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2 | 10000
example | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2 | 10000
example | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 | 10000
example | alter table pgbench_accounts add primary key (aid) | 1
example | alter table pgbench_branches add primary key (bid) | 1
example | alter table pgbench_tellers add primary key (tid) | 1
example | begin | 1
example | commit | 1
example | copy pgbench_accounts from stdin | 1
example | create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) | 1
example | create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) | 1
example | create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) | 1
example | create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) | 1
example | drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1
example | insert into pgbench_branches(bid,bbalance) values($1,$2) | 100
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 1000
(20 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_shared_buffer';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------------+-------+---------------+-------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
---------+---------------------------------------------------------------------------------------------------------------+-------
example | BEGIN | 10000
example | END | 10000
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP) | 10000
example | SELECT abalance FROM pgbench_accounts WHERE aid = $1 | 10000
example | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2 | 10000
example | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2 | 10000
example | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 | 10000
example | alter table pgbench_accounts add primary key (aid) | 1
example | alter table pgbench_branches add primary key (bid) | 1
example | alter table pgbench_tellers add primary key (tid) | 1
example | begin | 1
example | commit | 1
example | copy pgbench_accounts from stdin | 1
example | create table pgbench_accounts(aid int not null,bid int,abalance int,filler char(84)) with (fillfactor=100) | 1
example | create table pgbench_branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=100) | 1
example | create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) | 1
example | create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfactor=100) | 1
example | drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1
example | insert into pgbench_branches(bid,bbalance) values($1,$2) | 100
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 1000
(20 rows)
Drop extension pg_stat_monitor;

View File

@@ -27,16 +27,15 @@ SELECT key, txt_0, value_0 FROM TBL_0;
UPDATE TBL_0 SET value_0 = 1681692777;
select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
----------+-----------------------------------------------------------------------------------------------------+-------
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_normalized_query' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
postgres | select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, c | 1
(7 rows)
datname | query | calls
----------+-------------------------------------------------------------------------------------------+-------
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_normalized_query' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(6 rows)
Drop TABLE TBL_0;
SELECT pg_stat_monitor_reset();
@@ -67,15 +66,14 @@ SELECT key, txt_0, value_0 FROM TBL_0;
UPDATE TBL_0 SET value_0 = 1681692777;
select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
----------+-----------------------------------------------------------------------------------------------------+-------
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES($1, $2, $3) | 1
postgres | SELECT * from pg_stat_monitor_settings where name=$1 | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = $1 | 1
postgres | select datname, substr(query,$1,$2) as query, calls from pg_stat_monitor order by datname, query, c | 1
(7 rows)
datname | query | calls
----------+-------------------------------------------------------------------------------------------+-------
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_normalized_query' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(6 rows)
Drop extension pg_stat_monitor;

View File

@@ -29,15 +29,14 @@ UPDATE TBL_0 SET value_0 = 1681692777;
Analyze TBL_0;
DROP TABLE TBL_0;
select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
----------+-----------------------------------------------------------------------------------------------------+-------
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
postgres | select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, c | 1
(6 rows)
datname | query | calls
----------+----------------------------------------------------------------------------------------+-------
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(5 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
@@ -69,17 +68,16 @@ UPDATE TBL_0 SET value_0 = 1681692777;
Analyze TBL_0;
DROP TABLE TBL_0;
select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
datname | query | calls
----------+-----------------------------------------------------------------------------------------------------+-------
postgres | Analyze TBL_0 | 1
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | DROP TABLE TBL_0 | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
postgres | select datname, substr(query,0,100) as query, calls from pg_stat_monitor order by datname, query, c | 1
(9 rows)
datname | query | calls
----------+----------------------------------------------------------------------------------------+-------
postgres | Analyze TBL_0 | 1
postgres | CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int) | 1
postgres | DROP TABLE TBL_0 | 1
postgres | INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383) | 1
postgres | SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility' | 1
postgres | SELECT key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(8 rows)
Drop extension pg_stat_monitor;