mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
[PG-644] Add option to disable application name tracking (#469)
* Cache application name for every backed instance * Improve pg_get_backend_status performance for PG16 and PG17 * Fix * Make application_name tracking disabled by default * Meke app name tracking opt-out * Format newly added code with pgindent * Fix build for PG17 * Fix
This commit is contained in:
13
guc.c
13
guc.c
@@ -33,6 +33,7 @@ bool pgsm_enable_query_plan;
|
||||
bool pgsm_enable_overflow;
|
||||
bool pgsm_normalized_query;
|
||||
bool pgsm_track_utility;
|
||||
bool pgsm_track_application_names;
|
||||
bool pgsm_enable_pgsm_query_id;
|
||||
int pgsm_track;
|
||||
static int pgsm_overflow_target; /* Not used since 2.0 */
|
||||
@@ -190,6 +191,18 @@ init_guc(void)
|
||||
NULL /* show_hook */
|
||||
);
|
||||
|
||||
DefineCustomBoolVariable("pg_stat_monitor.pgsm_track_application_names", /* name */
|
||||
"Enable/Disable application names tracking.", /* short_desc */
|
||||
NULL, /* long_desc */
|
||||
&pgsm_track_application_names, /* value address */
|
||||
true, /* boot value */
|
||||
PGC_USERSET, /* context */
|
||||
0, /* flags */
|
||||
NULL, /* check_hook */
|
||||
NULL, /* assign_hook */
|
||||
NULL /* show_hook */
|
||||
);
|
||||
|
||||
DefineCustomBoolVariable("pg_stat_monitor.pgsm_enable_pgsm_query_id", /* name */
|
||||
"Enable/disable PGSM specific query id calculation which is very useful in comparing same query across databases and clusters..", /* short_desc */
|
||||
NULL, /* long_desc */
|
||||
|
||||
Reference in New Issue
Block a user