mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Move pg_stat_statements query jumbling to core.
Add compute_query_id GUC to control whether a query identifier should be computed by the core (off by default). It's thefore now possible to disable core queryid computation and use pg_stat_statements with a different algorithm to compute the query identifier by using a third-party module. To ensure that a single source of query identifier can be used and is well defined, modules that calculate a query identifier should throw an error if compute_query_id specified to compute a query id and if a query idenfitier was already calculated. Discussion: https://postgr.es/m/20210407125726.tkvjdbw76hxnpwfi@nol Author: Julien Rouhaud Reviewed-by: Alvaro Herrera, Nitin Jadhav, Zhihong Yu
This commit is contained in:
@@ -534,6 +534,7 @@ extern const struct config_enum_entry dynamic_shared_memory_options[];
|
||||
/*
|
||||
* GUC option variables that are exported from this module
|
||||
*/
|
||||
bool compute_query_id = false;
|
||||
bool log_duration = false;
|
||||
bool Debug_print_plan = false;
|
||||
bool Debug_print_parse = false;
|
||||
@@ -1458,6 +1459,15 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
true,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"compute_query_id", PGC_SUSET, STATS_MONITORING,
|
||||
gettext_noop("Compute query identifiers."),
|
||||
NULL
|
||||
},
|
||||
&compute_query_id,
|
||||
false,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"log_parser_stats", PGC_SUSET, STATS_MONITORING,
|
||||
gettext_noop("Writes parser performance statistics to the server log."),
|
||||
|
Reference in New Issue
Block a user