PG-563: Update TAP testcases and output due to changes by DEV.

As part of this PR, also updated regression test cases that are related to
following JIRA issues as well.

PG-354	pg_stat_monitor: Remove pg_stat_monitor_settings view
Now we not using pg_stat_monitor_settings view, due to this change majority of
TAP testcase requried output changes.

PG-558: Create test case to verify the function names and count in PGSM.
Added additional output file for SQL test case.

PG-554:	Remove redundant expected output files from regression.
Removed unnecessary output files in TAP testcases where these were not needed.
This commit is contained in:
Naeem Akhter
2022-12-24 22:44:05 +05:00
parent 56001d683f
commit b154da01da
68 changed files with 1282 additions and 10492 deletions

View File

@@ -5,51 +5,51 @@ 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 | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name LIKE '%pg_stat_monitor%';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+---------+---------+------------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | default | 1 | 2147483647 | | 60 | 60 | f
pg_stat_monitor.pgsm_enable_query_plan | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_extract_comments | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
pg_stat_monitor.pgsm_histogram_max | 100000 | | postmaster | integer | default | 10 | 2147483647 | | 100000 | 100000 | f
pg_stat_monitor.pgsm_histogram_min | 1 | | postmaster | integer | default | 0 | 2147483647 | | 1 | 1 | f
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | default | 1 | 1000 | | 100 | 100 | f
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
pg_stat_monitor.pgsm_normalized_query | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_overflow_target | 1 | | postmaster | integer | default | 0 | 1 | | 1 | 1 | f
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | default | 1 | 10000 | | 20 | 20 | f
pg_stat_monitor.pgsm_track | top | | user | enum | default | | | {none,top,all} | top | top | f
pg_stat_monitor.pgsm_track_planning | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_track_utility | on | | user | bool | default | | | | on | on | f
(15 rows)
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 | SELECT * from pg_stat_monitor_settings | 1
postgres | SELECT pg_stat_monitor_reset() | 1
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 | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
(2 rows)
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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name LIKE '%pg_stat_monitor%';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+---------+---------+------------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | default | 1 | 2147483647 | | 60 | 60 | f
pg_stat_monitor.pgsm_enable_query_plan | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_extract_comments | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
pg_stat_monitor.pgsm_histogram_max | 100000 | | postmaster | integer | default | 10 | 2147483647 | | 100000 | 100000 | f
pg_stat_monitor.pgsm_histogram_min | 1 | | postmaster | integer | default | 0 | 2147483647 | | 1 | 1 | f
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | default | 1 | 1000 | | 100 | 100 | f
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
pg_stat_monitor.pgsm_normalized_query | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_overflow_target | 1 | | postmaster | integer | default | 0 | 1 | | 1 | 1 | f
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | default | 1 | 10000 | | 20 | 20 | f
pg_stat_monitor.pgsm_track | top | | user | enum | default | | | {none,top,all} | top | top | f
pg_stat_monitor.pgsm_track_planning | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_track_utility | on | | user | bool | default | | | | on | on | f
(15 rows)
SELECT pg_stat_monitor_reset();
@@ -58,4 +58,4 @@ SELECT pg_stat_monitor_reset();
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

80
t/expected/001_settings_default.out.12 Normal file → Executable file
View File

@@ -5,49 +5,49 @@ 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name LIKE '%pg_stat_monitor%';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+---------+---------+------------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | default | 1 | 2147483647 | | 60 | 60 | f
pg_stat_monitor.pgsm_enable_query_plan | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_extract_comments | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
pg_stat_monitor.pgsm_histogram_max | 100000 | | postmaster | integer | default | 10 | 2147483647 | | 100000 | 100000 | f
pg_stat_monitor.pgsm_histogram_min | 1 | | postmaster | integer | default | 0 | 2147483647 | | 1 | 1 | f
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | default | 1 | 1000 | | 100 | 100 | f
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
pg_stat_monitor.pgsm_normalized_query | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_overflow_target | 1 | | postmaster | integer | default | 0 | 1 | | 1 | 1 | f
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | default | 1 | 10000 | | 20 | 20 | f
pg_stat_monitor.pgsm_track | top | | user | enum | default | | | {none,top,all} | top | top | f
pg_stat_monitor.pgsm_track_utility | on | | user | bool | default | | | | on | on | f
(14 rows)
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 | SELECT * from pg_stat_monitor_settings | 1
postgres | SELECT pg_stat_monitor_reset() | 1
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 | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
(2 rows)
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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name LIKE '%pg_stat_monitor%';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+---------+---------+------------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | default | 1 | 2147483647 | | 60 | 60 | f
pg_stat_monitor.pgsm_enable_query_plan | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_extract_comments | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
pg_stat_monitor.pgsm_histogram_max | 100000 | | postmaster | integer | default | 10 | 2147483647 | | 100000 | 100000 | f
pg_stat_monitor.pgsm_histogram_min | 1 | | postmaster | integer | default | 0 | 2147483647 | | 1 | 1 | f
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | default | 1 | 1000 | | 100 | 100 | f
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
pg_stat_monitor.pgsm_normalized_query | off | | user | bool | default | | | | off | off | f
pg_stat_monitor.pgsm_overflow_target | 1 | | postmaster | integer | default | 0 | 1 | | 1 | 1 | f
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | default | 1 | 10000 | | 20 | 20 | f
pg_stat_monitor.pgsm_track | top | | user | enum | default | | | {none,top,all} | top | top | f
pg_stat_monitor.pgsm_track_utility | on | | user | bool | default | | | | on | on | f
(14 rows)
SELECT pg_stat_monitor_reset();
@@ -56,4 +56,4 @@ SELECT pg_stat_monitor_reset();
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -1,48 +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_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 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;
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 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 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;
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)
Drop extension pg_stat_monitor;

View File

@@ -5,24 +5,24 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_extract_comments';
name | value | default_value | description | minimum | maximum | options | restart
---------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_extract_comments | yes | no | Enable/Disable extracting comments from queries. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name = 'pg_stat_monitor.pgsm_extract_comments';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
---------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_extract_comments | on | | user | bool | configuration file | | | | off | on | f
(1 row)
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/;
SELECT 1 AS num /* First comment */, 'John' AS Name /* Second comment*/;
num | name
-----+------
1 | John
(1 row)
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
query | comments
---------------------------------------------------------------------------------------------+------------------------------------------
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() |
query | comments
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
SELECT 1 AS num /* First comment */, 'John' AS Name /* Second comment*/ | /* First comment */, /* Second comment*/
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name = 'pg_stat_monitor.pgsm_extract_comments' |
SELECT pg_stat_monitor_reset() |
(3 rows)
SELECT pg_stat_monitor_reset();
@@ -31,24 +31,24 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name = 'pg_stat_monitor.pgsm_extract_comments';
name | value | default_value | description | minimum | maximum | options | restart
---------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name = 'pg_stat_monitor.pgsm_extract_comments';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
---------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_extract_comments | off | | user | bool | configuration file | | | | off | off | f
(1 row)
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/;
SELECT 1 AS num /* First comment */, 'John' AS Name /* Second comment*/;
num | name
-----+------
1 | John
(1 row)
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
query | comments
---------------------------------------------------------------------------------------------+----------
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() |
query | comments
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------
SELECT 1 AS num /* First comment */, 'John' AS Name /* Second comment*/ |
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name = 'pg_stat_monitor.pgsm_extract_comments' |
SELECT pg_stat_monitor_reset() |
(3 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------+-------+---------------+----------------------------------------------------------+---------+---------+----------------+---------
pg_stat_monitor.pgsm_track | none | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_track';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------+---------+------+---------+---------+--------------------+---------+---------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_track | none | | user | enum | configuration file | | | {none,top,all} | top | none | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------+-------+---------------+----------------------------------------------------------+---------+---------+----------------+---------
pg_stat_monitor.pgsm_track | all | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_track';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------+---------+------+---------+---------+--------------------+---------+---------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_track | all | | user | enum | configuration file | | | {none,top,all} | top | all | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------+-------+---------------+----------------------------------------------------------+---------+---------+----------------+---------
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_track';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------+---------+------+---------+---------+--------------------+---------+---------+----------------+----------+-----------+-----------------
pg_stat_monitor.pgsm_track | top | | user | enum | configuration file | | | {none,top,all} | top | top | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_enable_query_plan';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+--------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_enable_query_plan | yes | no | Enable/Disable query plan monitoring | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_enable_query_plan';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_enable_query_plan | on | | user | bool | configuration file | | | | off | on | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -26,29 +26,29 @@ SELECT key, txt_0, value_0 FROM TBL_0;
(1 row)
UPDATE TBL_0 SET value_0 = 1681692777;
select substr(query, 0,50) as query, calls, query_plan from pg_stat_monitor order by query,calls;
SELECT substr(query, 0,50) AS query, calls, query_plan FROM pg_stat_monitor ORDER BY query,calls;
query | calls | query_plan
---------------------------------------------------+-------+-------------------------------------------------------------------
CREATE TABLE TBL_0(key text primary key, txt_0 te | 1 |
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 1 |
SELECT * from pg_stat_monitor_settings where name | 1 | Function Scan on pg_stat_monitor_settings +
| | Filter: (name = 'pg_stat_monitor.pgsm_enable_query_plan'::text)
SELECT key, txt_0, value_0 FROM TBL_0 | 2 | Seq Scan on tbl_0
SELECT name, setting, unit, context, vartype, sou | 1 | Function Scan on pg_show_all_settings a +
| | Filter: (name = 'pg_stat_monitor.pgsm_enable_query_plan'::text)
SELECT pg_stat_monitor_reset() | 1 | Result
UPDATE TBL_0 SET value_0 = 1681692777 | 1 |
(6 rows)
Drop TABLE TBL_0;
DROP TABLE TBL_0;
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_enable_query_plan';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+--------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_enable_query_plan';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_enable_query_plan | off | | user | bool | configuration file | | | | off | off | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -66,15 +66,15 @@ SELECT key, txt_0, value_0 FROM TBL_0;
(1 row)
UPDATE TBL_0 SET value_0 = 1681692777;
select substr(query, 0,50) as query, calls, query_plan from pg_stat_monitor order by query,calls;
SELECT substr(query, 0,50) AS query, calls, query_plan FROM pg_stat_monitor ORDER BY query,calls;
query | calls | query_plan
---------------------------------------------------+-------+------------
CREATE TABLE TBL_0(key text primary key, txt_0 te | 1 |
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 1 |
SELECT * from pg_stat_monitor_settings where name | 1 |
SELECT key, txt_0, value_0 FROM TBL_0 | 2 |
SELECT name, setting, unit, context, vartype, sou | 1 |
SELECT pg_stat_monitor_reset() | 1 |
UPDATE TBL_0 SET value_0 = 1681692777 | 1 |
(6 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_overflow_target';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_overflow_target | 0 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_overflow_target';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_overflow_target | 0 | | postmaster | integer | configuration file | 0 | 1 | | 1 | 0 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_overflow_target';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_overflow_target';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_overflow_target | 1 | | postmaster | integer | configuration file | 0 | 1 | | 1 | 1 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,14 +5,14 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 1 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 1 | f
(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;
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
@@ -43,13 +43,13 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 100 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 100 | f
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
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
@@ -80,13 +80,13 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 20 | f
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
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
@@ -111,4 +111,4 @@ select datname, substr(query,0,150) as query, calls from pg_stat_monitor order b
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 1000
(20 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,14 +5,14 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 1 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 1 | f
(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;
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
@@ -43,13 +43,13 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 100 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 100 | f
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
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
@@ -80,13 +80,13 @@ SELECT 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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_shared_buffer';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_shared_buffer | 20 | MB | postmaster | integer | configuration file | 1 | 10000 | | 20 | 20 | f
(1 row)
select datname, substr(query,0,150) as query, calls from pg_stat_monitor order by datname, query, calls desc Limit 20;
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
@@ -111,4 +111,4 @@ select datname, substr(query,0,150) as query, calls from pg_stat_monitor order b
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 1000
(20 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 10 | | postmaster | integer | configuration file | 2 | 50 | | 20 | 10 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -53,10 +53,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 5 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 5 | | postmaster | integer | configuration file | 2 | 50 | | 20 | 5 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -65,10 +65,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_buckets | 20 | | postmaster | integer | default | 2 | 50 | | 20 | 20 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_max';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+--------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+---------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_max | 100000 | | postmaster | integer | default | 10 | 2147483647 | | 100000 | 100000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_max';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_max | 10 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_max | 10 | | postmaster | integer | configuration file | 10 | 2147483647 | | 100000 | 10 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_max';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_max | 100 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_max | 100 | | postmaster | integer | configuration file | 10 | 2147483647 | | 100000 | 100 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_max';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_max | 1000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_max | 1000 | | postmaster | integer | configuration file | 10 | 2147483647 | | 100000 | 1000 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_min';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_min | 1 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_min';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_min | 1 | | postmaster | integer | configuration file | 0 | 2147483647 | | 1 | 1 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_min';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_min | 1000 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_min';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_min | 1000 | | postmaster | integer | configuration file | 0 | 2147483647 | | 1 | 1000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_min';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_min | 10000 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_min';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_min | 10000 | | postmaster | integer | configuration file | 0 | 2147483647 | | 1 | 10000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_histogram_min';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_histogram_min | 99999 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_histogram_min';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_histogram_min | 99999 | | postmaster | integer | configuration file | 0 | 2147483647 | | 1 | 99999 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 10000 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 10000 | | postmaster | integer | configuration file | 1 | 2147483647 | | 60 | 10000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 1000 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 1000 | | postmaster | integer | configuration file | 1 | 2147483647 | | 60 | 1000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 100 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 100 | | postmaster | integer | configuration file | 1 | 2147483647 | | 60 | 100 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | configuration file | 1 | 2147483647 | | 60 | 60 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -53,10 +53,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 1 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 1 | | postmaster | integer | configuration file | 1 | 2147483647 | | 60 | 1 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -65,10 +65,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_bucket_time';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+--------------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_bucket_time';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+---------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_bucket_time | 60 | | postmaster | integer | default | 1 | 2147483647 | | 60 | 60 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 1 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 1 | | postmaster | integer | configuration file | 1 | 10 | | 10 | 1 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 2 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 2 | | postmaster | integer | configuration file | 1 | 10 | | 10 | 2 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 5 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 5 | | postmaster | integer | configuration file | 1 | 10 | | 10 | 5 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | configuration file | 1 | 10 | | 10 | 10 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -53,10 +53,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -65,10 +65,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max_buckets';
name | value | default_value | description | minimum | maximum | options | restart
----------------------------------+-------+---------------+-------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max_buckets';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
----------------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max_buckets | 10 | | postmaster | integer | default | 1 | 10 | | 10 | 10 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_normalized_query';
name | value | default_value | description | minimum | maximum | options | restart
---------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_normalized_query';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
---------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_normalized_query | off | | user | bool | configuration file | | | | off | off | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -26,28 +26,28 @@ SELECT key, txt_0, value_0 FROM TBL_0;
(1 row)
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
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 key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(6 rows)
Drop TABLE TBL_0;
DROP TABLE TBL_0;
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_normalized_query';
name | value | default_value | description | minimum | maximum | options | restart
---------------------------------------+-------+---------------+--------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_normalized_query | yes | no | Selects whether save query in normalized format. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_normalized_query';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
---------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_normalized_query | on | | user | bool | configuration file | | | | off | on | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -65,15 +65,15 @@ SELECT key, txt_0, value_0 FROM TBL_0;
(1 row)
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
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 key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = $1 | 1
(6 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_utility | no | yes | Selects whether utility commands are tracked. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_track_utility';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_track_utility | off | | user | bool | configuration file | | | | on | off | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -28,14 +28,14 @@ SELECT key, txt_0, value_0 FROM TBL_0;
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
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 key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(5 rows)
SELECT pg_stat_monitor_reset();
@@ -44,10 +44,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_track_utility';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_track_utility';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_track_utility | on | | user | bool | configuration file | | | | on | on | f
(1 row)
CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
@@ -67,17 +67,17 @@ SELECT key, txt_0, value_0 FROM TBL_0;
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
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 key, txt_0, value_0 FROM TBL_0 | 2
postgres | SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_v | 1
postgres | SELECT pg_stat_monitor_reset() | 1
postgres | UPDATE TBL_0 SET value_0 = 1681692777 | 1
(8 rows)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_max_len';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_query_max_len | 10240 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_max_len';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_max_len | 10240 | | postmaster | integer | configuration file | 1024 | 2147483647 | | 2048 | 10240 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_max_len';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_query_max_len | 1024 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_max_len';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+--------------------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_max_len | 1024 | | postmaster | integer | configuration file | 1024 | 2147483647 | | 2048 | 1024 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_max_len';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_max_len';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+---------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_max_len';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_max_len';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+---------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -53,10 +53,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_query_max_len';
name | value | default_value | description | minimum | maximum | options | restart
------------------------------------+-------+---------------+-----------------------------------+---------+------------+---------+---------
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_query_max_len';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
------------------------------------+---------+------+------------+---------+---------+---------+------------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_query_max_len | 2048 | | postmaster | integer | default | 1024 | 2147483647 | | 2048 | 2048 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -5,10 +5,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------+-------+---------------+----------------------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max | 1000 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max | 1000 | MB | postmaster | integer | configuration file | 1 | 1000 | | 100 | 1000 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -17,10 +17,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------+-------+---------------+----------------------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max | 500 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max | 500 | MB | postmaster | integer | configuration file | 1 | 1000 | | 100 | 500 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -29,10 +29,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max';
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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | configuration file | 1 | 1000 | | 100 | 100 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -41,10 +41,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------+-------+---------------+----------------------------------------------------------------------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_max | 10 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------+---------+------+------------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max | 10 | MB | postmaster | integer | configuration file | 1 | 1000 | | 100 | 10 | f
(1 row)
SELECT pg_stat_monitor_reset();
@@ -53,10 +53,10 @@ SELECT pg_stat_monitor_reset();
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_max';
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
SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_max';
name | setting | unit | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | pending_restart
--------------------------+---------+------+------------+---------+---------+---------+---------+----------+----------+-----------+-----------------
pg_stat_monitor.pgsm_max | 100 | MB | postmaster | integer | default | 1 | 1000 | | 100 | 100 | f
(1 row)
Drop extension pg_stat_monitor;
DROP EXTENSION pg_stat_monitor;

View File

@@ -1,61 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
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;
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 query, calls, total_exec_time, min_exec_time, max_exec_time, mean_exec_time, stddev_exec_time from pg_stat_monitor;
query | calls | total_exec_time | min_exec_time | max_exec_time | mean_exec_time | stddev_exec_time
----------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
SELECT pg_stat_monitor_reset() | 1 | 0.0945 | 0.0945 | 0.0945 | 0.0945 | 0
SELECT * from pg_stat_monitor_settings | 2 | 0.1556 | 0.0772 | 0.0784 | 0.0778 | 0.0006
(2 rows)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
Drop extension pg_stat_monitor;

View File

@@ -1,217 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
create table foo (id int generated by default as identity,col1 varchar(100) not null,primary key(id));
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_overflow_target';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_overflow_target | 0 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
(1 row)
SELECT substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
---------------------------------------------------+--------+--------+------------------+-------+--------+---------+---------
INSERT INTO TBL_1(key, txt_0, value_0) VALUES('00 | 81 | 4 | 425215546842CC9F | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_1 | 37 | 4 | 642812FD3BD60B9 | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 1129566413 | 37 | 4 | 42C137E8296B7B13 | 1 | 0 | |
UPDATE TBL_0 SET value_0 = 1681692777 | 37 | 4 | 84E8FF47CCC35A79 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 4 | C368081377909E88 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 285 | 4 | 4BFCEC3D6B8B2389 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2 | 37 | 4 | 1AAF5BC84396638E | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0) VALUES('00 | 80 | 4 | F080D3EC62067A1B | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0) VALUES('00 | 81 | 4 | 4F3EA5E59FFA3EE | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 119 | 4 | 1F9475F8C6FF7450 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 101 | 4 | 2E632329D6BF54D5 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_0 | 37 | 4 | 4717FB60E3CC503B | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 184803526, value_1 = 4 | 57 | 4 | 777CC1DE559A3E66 | 1 | 0 | |
UPDATE TBL_1 SET value_0 = 1189641421 | 37 | 4 | 58307E26872267E6 | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 137806862, value_1 = 4 | 98 | 4 | 29BE7C136A1E13BF | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 243 | 4 | 531DD5B35CF7630A | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 4 | 5AF4EB1FDEE106F1 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1843993368, value_1 = | 80 | 4 | A5791D1CFBB6FAA7 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_5 | 37 | 4 | 67C5269569CDB71E | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 4 | 8A3E62C8CDDD9733 | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0) VALUES('00 | 81 | 4 | 3DBCC9E726D14CA1 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1264095060, value_1 = | 59 | 4 | BF4BE35F437265F4 | 1 | 0 | |
CREATE TABLE TBL_1(key text primary key, txt_0 te | 90 | 4 | DA9FC3ABF2D1C209 | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 162 | 4 | C8F4FFB0C37A185B | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 121 | 4 | 136E24529417D5E7 | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 1573363368 | 37 | 4 | 19739EF080A9034 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 101 | 4 | D6221385FE7DE4A4 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | 64DCE08492228639 | 1 | 0 | |
CREATE TABLE TBL_4(key text primary key, txt_0 te | 165 | 4 | F0D9F5857E930C16 | 1 | 0 | |
UPDATE TBL_2 SET value_0 = 233665123, value_1 = 2 | 79 | 4 | F0E843B51DE2EE36 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 160 | 4 | B361F9DF99F5D18E | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 122 | 4 | B56564995B2EDD01 | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 1424268980, value_1 = | 80 | 4 | 7A0CF7AC932A3BC6 | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 244 | 4 | FEE0AB71F441E443 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 4 | A0EA13F12EB2E052 | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 111537764, value_1 = 3 | 143 | 4 | E860C5C5BCE2643A | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0, txt_1, val | 160 | 4 | F7A6032CE4BBA59A | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 204 | 4 | 4718A03D9F4B3A5 | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 162 | 4 | 3E4D3DB767D7AF30 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_4 | 37 | 4 | 21D40B37FE159591 | 1 | 0 | |
SELECT * from pg_stat_monitor_settings where name | 88 | 4 | 35336C79D4EE3E7A | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 203 | 4 | 5EABBB0C356C813F | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 204 | 4 | D802BBF5B8196E27 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 4 | F3B7BEF02629DA0D | 1 | 0 | |
CREATE TABLE TBL_2(key text primary key, txt_0 te | 115 | 4 | CE277C93214FCB24 | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 246 | 4 | 20B984D66BF8D2BA | 1 | 0 | |
CREATE TABLE TBL_0(key text primary key, txt_0 te | 65 | 4 | 2370BA7F69455FDE | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 203 | 4 | E9DA5C8CD89D1A69 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 4 | 1664EFC58E5FC941 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 4 | 5E3AE9677A5CE42F | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 855636226, value_1 = 1 | 102 | 4 | 60DF94323EB8A8F8 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1036140795, value_1 = | 123 | 4 | C07B7ABFF0D106D7 | 1 | 0 | |
CREATE TABLE TBL_3(key text primary key, txt_0 te | 140 | 4 | E591CDC9199A2848 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 117 | 4 | FD5709FCD0DEDDFB | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 289 | 4 | 50C68B38B49D9257 | 1 | 0 | |
UPDATE TBL_1 SET value_0 = 1025202362, value_1 = | 59 | 4 | 44EB0DD7B8765DBC | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0, txt_1, val | 123 | 4 | 1042FB7071669FBD | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_6 | 37 | 4 | FB1B5C02DAB7A78B | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | 98EE98C0A136221F | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_3 | 37 | 4 | 20DBA6828489F5C | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 289700723, value_1 = 1 | 100 | 4 | A4D049DB6C360F60 | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 1373226340, value_1 = | 80 | 4 | 684C2BBAF832A4C | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | EE91B6DA51D9AD6C | 1 | 0 | |
UPDATE TBL_2 SET value_0 = 861021530, value_1 = 2 | 57 | 4 | 5A3B72B3D714FF8A | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0, txt_1, val | 326 | 4 | DAA3E6A3E8A8D8E7 | 1 | 0 | |
SELECT pg_stat_monitor_reset() | 30 | 4 | DED7C3BDC91B9C6D | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 164 | 4 | F2F54F14A9D869BD | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 4 | 8383F8A61E7D75C5 | 1 | 0 | |
INSERT INTO TBL_1(key, txt_0, value_0, txt_1, val | 120 | 4 | 3E34961802B1F799 | 1 | 0 | |
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 80 | 4 | 33BB7D634EA87EC0 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | DBFDB7981AEB07 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 2053999932 | 37 | 4 | 6FD98289D24978C2 | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0) VALUES('00 | 80 | 4 | C5934EEBC3AFA46B | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 4 | 1AE30BFC91FD9D56 | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 122 | 4 | CD952DBAE952CF6B | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 1409959708, value_1 = | 59 | 4 | 5C786CA0895A64DF | 1 | 0 | |
UPDATE TBL_5 SET value_0 = 439493451, value_1 = 9 | 123 | 4 | 91718DC4B66BFC48 | 1 | 0 | |
CREATE TABLE TBL_6(key text primary key, txt_0 te | 215 | 4 | DB3EBF6DC67E61D0 | 1 | 0 | |
INSERT INTO TBL_6(key, txt_0, value_0) VALUES('00 | 80 | 4 | 68BA138F9F6BD81E | 1 | 0 | |
UPDATE TBL_2 SET value_0 = 336465782 | 36 | 4 | 912DEFFBDDE76F | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 101 | 4 | 2CA60B4B4BC6832D | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | 74A743B139055406 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 4 | 7D707B541DCFB4DA | 1 | 0 | |
CREATE TABLE TBL_5(key text primary key, txt_0 te | 190 | 4 | D3A3EECC1A5320C1 | 1 | 0 | |
(84 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
84
(1 row)
SELECT pg_stat_monitor_reset();
pg_stat_monitor_reset
-----------------------
(1 row)
SELECT * from pg_stat_monitor_settings where name='pg_stat_monitor.pgsm_overflow_target';
name | value | default_value | description | minimum | maximum | options | restart
--------------------------------------+-------+---------------+----------------------------------------------+---------+---------+---------+---------
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
(1 row)
SELECT substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
---------------------------------------------------+--------+--------+------------------+-------+--------+---------+---------
SELECT key, txt_0, value_0 FROM TBL_2_0 | 39 | 5 | BEABFDEAD2814D49 | 1 | 0 | |
UPDATE TBL_2_1 SET value_0 = 1189641421 | 39 | 5 | 8EB080EC0FE7A841 | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 1373226340, value_1 | 82 | 5 | F6027C98AE032981 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | 48162B33BC7640C3 | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0, txt_1, v | 162 | 5 | 966BB8A73D9D0CB1 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 287 | 5 | B86F5F013045BB35 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | 6F4658C0C4D476E4 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 5 | 2F9348F3E811B79A | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0) VALUES(' | 83 | 5 | 8AFE97DA5BA270F3 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 5 | 52AB50A6A1D5245A | 1 | 0 | |
SELECT * from pg_stat_monitor_settings where name | 88 | 5 | 35336C79D4EE3E7A | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | 2B56BD4846F0945A | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 162 | 5 | 73D7DCDC196DA935 | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 233665123, value_1 = | 81 | 5 | 37B4252EA3D0ACD0 | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 111537764, value_1 = | 145 | 5 | 1F418B9A962BB6A1 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | B43A896BE23F7334 | 1 | 0 | |
CREATE TABLE TBL_2_2(key text primary key, txt_0 | 117 | 5 | 439CC4659745887A | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0, txt_1, v | 125 | 5 | 9CF25142A821A28A | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 123 | 5 | 78B7E1236DE48707 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 1129566413 | 39 | 5 | 6D9B5FD9B3ECB930 | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 205 | 5 | 2D60780B6E5147F4 | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 328 | 5 | 944D106C874E505F | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 137806862, value_1 = | 100 | 5 | 4826BD5A1850C3DB | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 103 | 5 | 2689FAB68E4D0D85 | 1 | 0 | |
INSERT INTO TBL_2_0(key, txt_0, value_0) VALUES(' | 82 | 5 | 8697D20BA92E0E4F | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0) VALUES(' | 82 | 5 | FF97B9D9C6F55008 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | 44008D5A23F76423 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_5 | 39 | 5 | 82535261690FDE1D | 1 | 0 | |
CREATE TABLE TBL_2_6(key text primary key, txt_0 | 217 | 5 | EC329A861A52B4EE | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 124 | 5 | C09694BDCD5115CB | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 164 | 5 | 9F00CFC22B8F5E50 | 1 | 0 | |
CREATE TABLE TBL_2_1(key text primary key, txt_0 | 92 | 5 | EB49AF77DF6ACE91 | 1 | 0 | |
CREATE TABLE TBL_2_3(key text primary key, txt_0 | 142 | 5 | F079ED304A17DBC5 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 5 | EE70E798E0D391B1 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 5 | 3A7949DB15452FA | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 1409959708, value_1 | 61 | 5 | C9A06B057D63F749 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 5 | AB3D91620522B027 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1843993368, value_1 | 82 | 5 | ED5B292A448E4E44 | 1 | 0 | |
UPDATE TBL_2_0 SET value_0 = 1681692777 | 39 | 5 | D17CA038032BEF1 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_1 | 39 | 5 | EECA294B4F4BFA31 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_3 | 39 | 5 | 678DD130B42BE005 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 164 | 5 | 38A7344ABD42E2D4 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 2053999932 | 39 | 5 | 3681F525B0E1E277 | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 1573363368 | 39 | 5 | C18799329D899EB1 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1036140795, value_1 | 125 | 5 | 714EBA1E5D48D2F9 | 1 | 0 | |
INSERT INTO TBL_2_1(key, txt_0, value_0, txt_1, v | 122 | 5 | E67C2A4876991361 | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 248 | 5 | 5DA4769C51C5AADE | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_2 | 39 | 5 | A4945C687430A780 | 1 | 0 | |
CREATE TABLE TBL_2_4(key text primary key, txt_0 | 167 | 5 | 45D0728F70837703 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 206 | 5 | B282D8834F6C7796 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 103 | 5 | 49C3BBB8EFB45A07 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_4 | 39 | 5 | 2B54471951894604 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 5 | 175EC70143A0B1EF | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 5 | 56787B092622E1F | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 124 | 5 | DC3E349EB74C19E5 | 1 | 0 | |
INSERT INTO TBL_2_1(key, txt_0, value_0) VALUES(' | 83 | 5 | 7E999BC11FAAB01D | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 166 | 5 | 578B4CBEC849C5AC | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 439493451, value_1 = | 125 | 5 | B613D1D1ADEA52D3 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 119 | 5 | C2D156A5412FCBBC | 1 | 0 | |
CREATE TABLE TBL_2_5(key text primary key, txt_0 | 192 | 5 | B3FA223A87014AE | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 336465782 | 38 | 5 | B3F9A1C4B84F1F6E | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0) VALUES(' | 82 | 5 | 20169C95EF903F83 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 5 | 8CF9F5BEF1F4EA82 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 1424268980, value_1 | 82 | 5 | 3DF7E3F09F312E6C | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 861021530, value_1 = | 59 | 5 | F24B049D9A1F87B6 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 5 | 3B37D99AD3D9106D | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 291 | 5 | 1BD7BE4EBEB871C6 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0) VALUES(' | 82 | 5 | 725801B5D3BF0FC7 | 1 | 0 | |
UPDATE TBL_2_1 SET value_0 = 1025202362, value_1 | 61 | 5 | 840DA100E65E11AB | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1264095060, value_1 | 61 | 5 | 867FF05B638DBE97 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_6 | 39 | 5 | E9518C2C857542D9 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 5 | A2938DCD37EA0B53 | 1 | 0 | |
CREATE TABLE TBL_2_0(key text primary key, txt_0 | 67 | 5 | 2FDDD5D4F3A6A2E5 | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 121 | 5 | 1416EACC75B937AB | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 184803526, value_1 = | 59 | 5 | 481E62DF6E13F673 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 246 | 5 | C0C08BEE90320 | 1 | 0 | |
SELECT pg_stat_monitor_reset() | 30 | 5 | DED7C3BDC91B9C6D | 1 | 0 | |
INSERT INTO TBL_2_6(key, txt_0, value_0, txt_1, v | 206 | 5 | 4BAABE93F282D092 | 1 | 0 | |
UPDATE TBL_2_5 SET value_0 = 289700723, value_1 = | 102 | 5 | 45E0C3BF1E276540 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 205 | 5 | DF620AAF2D68C1B9 | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0) VALUES(' | 83 | 5 | 3B74D31DC24049AE | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 245 | 5 | ED14C4FF5E930055 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 103 | 5 | CEBAE05D2A5275B7 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 855636226, value_1 = | 104 | 5 | 5FC4696DAD56E2EA | 1 | 0 | |
(84 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
84
(1 row)
Drop extension pg_stat_monitor;

View File

@@ -1,94 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
create table foo (id int generated by default as identity,col1 varchar(100) not null,primary key(id));
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 | 1 | 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 | 2 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 1 | 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 | 1 | 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 | 0 | 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 substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
--------+--------+--------+---------+-------+--------+---------+---------
(0 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
0
(1 row)
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 | 1 | 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 | 2 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
pg_stat_monitor.pgsm_bucket_time | 1 | 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 | 1 | 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 substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
---------------------------------------------------+--------+--------+------------------+-------+--------+---------+---------
UPDATE TBL_2_81 SET value_0 = 1233558186, value_1 | 584 | 0 | 3701D68BEA093403 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1408 | 1 | 9E24F6C78B91466D | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1174 | 1 | DA018C53C04C08AE | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1210 | 1 | 2B90260D4BC8A0DD | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1264 | 1 | 202C5719118D470B | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1192 | 1 | F1FD09DE4F81249A | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1156 | 1 | 6293B3A1336BBE8B | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1282 | 1 | C7815236554A7720 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1300 | 1 | FFC2819A38F41A12 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1372 | 1 | 6957581EA501B313 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1354 | 1 | 600F171F94A7F721 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1426 | 1 | 278C46300D46D0A3 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1318 | 1 | 97D2167E4CB586A6 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1336 | 1 | 92C3EFFB72E5290C | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1228 | 1 | 38BD5BF75DFD7C17 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1246 | 1 | 155693EA64D27308 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 1390 | 1 | 363709BA30BC1F27 | 1 | 0 | |
(17 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
18
(1 row)
Drop extension pg_stat_monitor;

View File

@@ -1,203 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
create table foo (id int generated by default as identity,col1 varchar(100) not null,primary key(id));
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 | 1 | 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 | 10000 | 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 | 1 | 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 | 0 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
pg_stat_monitor.pgsm_enable_query_plan | yes | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | all | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | yes | 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 substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
---------------------------------------------------+--------+--------+------------------+-------+--------+---------+---------
SELECT key, txt_0, value_0 FROM TBL_3 | 37 | 7 | 20DBA6828489F5C | 1 | 0 | |
CREATE TABLE TBL_5(key text primary key, txt_0 te | 190 | 7 | D3A3EECC1A5320C1 | 2 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 7 | 8A3E62C8CDDD9733 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 7 | 98EE98C0A136221F | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0, txt_1, val | 160 | 7 | F7A6032CE4BBA59A | 1 | 0 | |
CREATE TABLE TBL_3(key text primary key, txt_0 te | 140 | 7 | E591CDC9199A2848 | 2 | 0 | |
UPDATE TBL_2 SET value_0 = 233665123, value_1 = 2 | 79 | 7 | F0E843B51DE2EE36 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 121 | 7 | 136E24529417D5E7 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1036140795, value_1 = | 123 | 7 | C07B7ABFF0D106D7 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1843993368, value_1 = | 80 | 7 | A5791D1CFBB6FAA7 | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0) VALUES('00 | 80 | 7 | F080D3EC62067A1B | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 7 | EE91B6DA51D9AD6C | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 7 | F3B7BEF02629DA0D | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 1129566413 | 37 | 7 | 42C137E8296B7B13 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 7 | DBFDB7981AEB07 | 1 | 0 | |
UPDATE TBL_2 SET value_0 = 861021530, value_1 = 2 | 57 | 7 | 5A3B72B3D714FF8A | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_4 | 37 | 7 | 21D40B37FE159591 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 7 | 64DCE08492228639 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 101 | 7 | 2E632329D6BF54D5 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 243 | 7 | 531DD5B35CF7630A | 1 | 0 | |
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 80 | 7 | 33BB7D634EA87EC0 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 285 | 7 | 4BFCEC3D6B8B2389 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 7 | 5AF4EB1FDEE106F1 | 1 | 0 | |
SELECT * from pg_stat_monitor_settings | 38 | 7 | 1FC4A7E71F639F9D | 1 | 0 | |
CREATE TABLE TBL_0(key text primary key, txt_0 te | 65 | 7 | 2370BA7F69455FDE | 2 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 7 | 5E3AE9677A5CE42F | 1 | 0 | |
INSERT INTO TBL_1(key, txt_0, value_0) VALUES('00 | 81 | 7 | 425215546842CC9F | 1 | 0 | |
UPDATE TBL_1 SET value_0 = 1189641421 | 37 | 7 | 58307E26872267E6 | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0) VALUES('00 | 80 | 7 | C5934EEBC3AFA46B | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 162 | 7 | C8F4FFB0C37A185B | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 164 | 7 | F2F54F14A9D869BD | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_0 | 37 | 7 | 4717FB60E3CC503B | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 137806862, value_1 = 4 | 98 | 7 | 29BE7C136A1E13BF | 1 | 0 | |
INSERT INTO TBL_2(key, txt_0, value_0, txt_1, val | 123 | 7 | 1042FB7071669FBD | 1 | 0 | |
UPDATE TBL_0 SET value_0 = 1681692777 | 37 | 7 | 84E8FF47CCC35A79 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_1 | 37 | 7 | 642812FD3BD60B9 | 1 | 0 | |
CREATE TABLE TBL_1(key text primary key, txt_0 te | 90 | 7 | DA9FC3ABF2D1C209 | 2 | 0 | |
INSERT INTO TBL_1(key, txt_0, value_0, txt_1, val | 120 | 7 | 3E34961802B1F799 | 1 | 0 | |
SELECT pg_stat_monitor_reset() | 30 | 7 | DED7C3BDC91B9C6D | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 2053999932 | 37 | 7 | 6FD98289D24978C2 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 7 | 1664EFC58E5FC941 | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 184803526, value_1 = 4 | 57 | 7 | 777CC1DE559A3E66 | 1 | 0 | |
UPDATE TBL_2 SET value_0 = 336465782 | 36 | 7 | 912DEFFBDDE76F | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_5 | 37 | 7 | 67C5269569CDB71E | 1 | 0 | |
CREATE TABLE TBL_2(key text primary key, txt_0 te | 115 | 7 | CE277C93214FCB24 | 2 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0) VALUES('00 | 81 | 7 | 3DBCC9E726D14CA1 | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 244 | 7 | FEE0AB71F441E443 | 1 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 204 | 7 | 4718A03D9F4B3A5 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 160 | 7 | B361F9DF99F5D18E | 1 | 0 | |
UPDATE TBL_3 SET value_0 = 1424268980, value_1 = | 80 | 7 | 7A0CF7AC932A3BC6 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0, txt_1, val | 203 | 7 | 5EABBB0C356C813F | 1 | 0 | |
CREATE TABLE TBL_4(key text primary key, txt_0 te | 165 | 7 | F0D9F5857E930C16 | 2 | 0 | |
INSERT INTO TBL_4(key, txt_0, value_0, txt_1, val | 122 | 7 | B56564995B2EDD01 | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 855636226, value_1 = 1 | 102 | 7 | 60DF94323EB8A8F8 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 53 | 7 | 74A743B139055406 | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 122 | 7 | CD952DBAE952CF6B | 1 | 0 | |
INSERT INTO TBL_3(key, txt_0, value_0, txt_1, val | 203 | 7 | E9DA5C8CD89D1A69 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 69 | 7 | C368081377909E88 | 1 | 0 | |
INSERT INTO TBL_5(key, txt_0, value_0) VALUES('00 | 81 | 7 | 4F3EA5E59FFA3EE | 1 | 0 | |
UPDATE TBL_1 SET value_0 = 1025202362, value_1 = | 59 | 7 | 44EB0DD7B8765DBC | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2 | 37 | 7 | 1AAF5BC84396638E | 1 | 0 | |
UPDATE TBL_4 SET value_0 = 1264095060, value_1 = | 59 | 7 | BF4BE35F437265F4 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 85 | 7 | 1AE30BFC91FD9D56 | 1 | 0 | |
(63 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
63
(1 row)
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 | 1 | 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 | 10000 | 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 | 1 | 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 | yes | no | Enable/Disable query plan monitoring | | | yes, no | no
pg_stat_monitor.pgsm_track | all | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
pg_stat_monitor.pgsm_extract_comments | yes | 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 substr(query, 0, 50), length(query), bucket, queryid, calls, elevel, sqlcode, message from pg_stat_monitor;
substr | length | bucket | queryid | calls | elevel | sqlcode | message
---------------------------------------------------+--------+--------+------------------+-------+--------+---------+---------
CREATE TABLE TBL_2_4(key text primary key, txt_0 | 167 | 8 | 45D0728F70837703 | 2 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 8 | 44008D5A23F76423 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_4 | 39 | 8 | 2B54471951894604 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_1 | 39 | 8 | EECA294B4F4BFA31 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 8 | 175EC70143A0B1EF | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0, txt_1, v | 162 | 8 | 966BB8A73D9D0CB1 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 8 | EE70E798E0D391B1 | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0) VALUES(' | 82 | 8 | FF97B9D9C6F55008 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_0 | 39 | 8 | BEABFDEAD2814D49 | 1 | 0 | |
SELECT pg_stat_monitor_reset() | 30 | 8 | DED7C3BDC91B9C6D | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 8 | A2938DCD37EA0B53 | 1 | 0 | |
CREATE TABLE TBL_2_1(key text primary key, txt_0 | 92 | 8 | EB49AF77DF6ACE91 | 2 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 8 | AB3D91620522B027 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0) VALUES(' | 82 | 8 | 725801B5D3BF0FC7 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 205 | 8 | DF620AAF2D68C1B9 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 124 | 8 | DC3E349EB74C19E5 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 8 | 2B56BD4846F0945A | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 233665123, value_1 = | 81 | 8 | 37B4252EA3D0ACD0 | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 336465782 | 38 | 8 | B3F9A1C4B84F1F6E | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0) VALUES(' | 83 | 8 | 3B74D31DC24049AE | 1 | 0 | |
INSERT INTO TBL_2_1(key, txt_0, value_0, txt_1, v | 122 | 8 | E67C2A4876991361 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0) VALUES(' | 83 | 8 | 8AFE97DA5BA270F3 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 287 | 8 | B86F5F013045BB35 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 184803526, value_1 = | 59 | 8 | 481E62DF6E13F673 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 137806862, value_1 = | 100 | 8 | 4826BD5A1850C3DB | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 8 | 6F4658C0C4D476E4 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1843993368, value_1 | 82 | 8 | ED5B292A448E4E44 | 1 | 0 | |
CREATE TABLE TBL_2_2(key text primary key, txt_0 | 117 | 8 | 439CC4659745887A | 2 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 166 | 8 | 578B4CBEC849C5AC | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 164 | 8 | 38A7344ABD42E2D4 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 1129566413 | 39 | 8 | 6D9B5FD9B3ECB930 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 8 | 2F9348F3E811B79A | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 205 | 8 | 2D60780B6E5147F4 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 855636226, value_1 = | 104 | 8 | 5FC4696DAD56E2EA | 1 | 0 | |
CREATE TABLE TBL_2_5(key text primary key, txt_0 | 192 | 8 | B3FA223A87014AE | 2 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 245 | 8 | ED14C4FF5E930055 | 1 | 0 | |
CREATE TABLE TBL_2_3(key text primary key, txt_0 | 142 | 8 | F079ED304A17DBC5 | 2 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 246 | 8 | C0C08BEE90320 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_5 | 39 | 8 | 82535261690FDE1D | 1 | 0 | |
SELECT * from pg_stat_monitor_settings | 38 | 8 | 1FC4A7E71F639F9D | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_2 | 39 | 8 | A4945C687430A780 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 87 | 8 | 3B37D99AD3D9106D | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 8 | 56787B092622E1F | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 103 | 8 | 2689FAB68E4D0D85 | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 123 | 8 | 78B7E1236DE48707 | 1 | 0 | |
SELECT key, txt_0, value_0 FROM TBL_2_3 | 39 | 8 | 678DD130B42BE005 | 1 | 0 | |
INSERT INTO TBL_2_4(key, txt_0, value_0, txt_1, v | 206 | 8 | B282D8834F6C7796 | 1 | 0 | |
INSERT INTO TBL_2_2(key, txt_0, value_0, txt_1, v | 125 | 8 | 9CF25142A821A28A | 1 | 0 | |
INSERT INTO TBL_2_0(key, txt_0, value_0) VALUES(' | 82 | 8 | 8697D20BA92E0E4F | 1 | 0 | |
INSERT INTO TBL_2_3(key, txt_0, value_0, txt_1, v | 124 | 8 | C09694BDCD5115CB | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1 FROM T | 55 | 8 | 48162B33BC7640C3 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1264095060, value_1 | 61 | 8 | 867FF05B638DBE97 | 1 | 0 | |
INSERT INTO TBL_2_1(key, txt_0, value_0) VALUES(' | 83 | 8 | 7E999BC11FAAB01D | 1 | 0 | |
UPDATE TBL_2_1 SET value_0 = 1189641421 | 39 | 8 | 8EB080EC0FE7A841 | 1 | 0 | |
SELECT key, txt_0, value_0, txt_1, value_1, txt_2 | 71 | 8 | 8CF9F5BEF1F4EA82 | 1 | 0 | |
UPDATE TBL_2_3 SET value_0 = 1424268980, value_1 | 82 | 8 | 3DF7E3F09F312E6C | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 2053999932 | 39 | 8 | 3681F525B0E1E277 | 1 | 0 | |
UPDATE TBL_2_2 SET value_0 = 861021530, value_1 = | 59 | 8 | F24B049D9A1F87B6 | 1 | 0 | |
UPDATE TBL_2_0 SET value_0 = 1681692777 | 39 | 8 | D17CA038032BEF1 | 1 | 0 | |
UPDATE TBL_2_4 SET value_0 = 1036140795, value_1 | 125 | 8 | 714EBA1E5D48D2F9 | 1 | 0 | |
CREATE TABLE TBL_2_0(key text primary key, txt_0 | 67 | 8 | 2FDDD5D4F3A6A2E5 | 2 | 0 | |
UPDATE TBL_2_1 SET value_0 = 1025202362, value_1 | 61 | 8 | 840DA100E65E11AB | 1 | 0 | |
INSERT INTO TBL_2_5(key, txt_0, value_0, txt_1, v | 162 | 8 | 73D7DCDC196DA935 | 1 | 0 | |
(63 rows)
SELECT count(queryid) from pg_stat_monitor;
count
-------
63
(1 row)
Drop extension pg_stat_monitor;

File diff suppressed because it is too large Load Diff