From fd1691626c7b752370635c9593e457fd800f3c39 Mon Sep 17 00:00:00 2001 From: Diego Fronza Date: Mon, 20 Dec 2021 11:28:29 -0300 Subject: [PATCH] PG-293: Disable pgsm_track_planning. This GUC must be disabled by default, it incurss a small performance penalty in the PostgreSQL TPS, users can enable it at anytime if they wish to. --- guc.c | 2 +- regression/expected/guc.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guc.c b/guc.c index b7f5e08..6612384 100644 --- a/guc.c +++ b/guc.c @@ -207,7 +207,7 @@ init_guc(void) conf[i] = (GucVariable) { .guc_name = "pg_stat_monitor.pgsm_track_planning", .guc_desc = "Selects whether planning statistics are tracked.", - .guc_default = 1, + .guc_default = 0, .guc_min = 0, .guc_max = 0, .guc_restart = false, diff --git a/regression/expected/guc.out b/regression/expected/guc.out index 90bb7b9..953d783 100644 --- a/regression/expected/guc.out +++ b/regression/expected/guc.out @@ -26,7 +26,7 @@ SELECT * FROM pg_stat_monitor_settings ORDER BY name COLLATE "C"; pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes pg_stat_monitor.pgsm_query_max_len | 1024 | 1024 | Sets the maximum length of query. | 1024 | 2147483647 | | 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_track_planning | yes | yes | Selects whether planning statistics are tracked. | | | yes, no | no + pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no pg_stat_monitor.track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no (15 rows)