From cafde58b337e007cb6a719f5ab4dd6459d932a39 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Sat, 15 May 2021 14:13:09 -0400 Subject: Allow compute_query_id to be set to 'auto' and make it default Allowing only on/off meant that all either all existing configuration guides would become obsolete if we disabled it by default, or that we would have to accept a performance loss in the default config if we enabled it by default. By allowing 'auto' as a middle ground, the performance cost is only paid by those who enable pg_stat_statements and similar modules. I only edited the release notes to comment-out a paragraph that is now factually wrong; further edits are probably needed to describe the related change in more detail. Author: Julien Rouhaud Reviewed-by: Justin Pryzby Discussion: https://postgr.es/m/20210513002623.eugftm4nk2lvvks3@nol --- doc/src/sgml/config.sgml | 9 +++++++-- doc/src/sgml/pgstatstatements.sgml | 14 +++++--------- doc/src/sgml/release-14.sgml | 2 ++ 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 45bd1f1b7e3..7e32b0686c6 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7627,7 +7627,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; - compute_query_id (boolean) + compute_query_id (enum) compute_query_id configuration parameter @@ -7643,7 +7643,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; identifier to be computed. Note that an external module can alternatively be used if the in-core query identifier computation method is not acceptable. In this case, in-core computation - must be disabled. The default is off. + must be always disabled. + Valid values are off (always disabled), + on (always enabled) and auto, + which lets modules such as + automatically enable it. + The default is auto. diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index bc2b6038ee8..aa332d8cc22 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -18,18 +18,14 @@ in postgresql.conf, because it requires additional shared memory. This means that a server restart is needed to add or remove the module. + In addition, query identifier calculation must be enabled in order for the + module to be active, which is done automatically if + is set to auto or on, or any third-party + module that calculates query identifiers is loaded. - The module will not track statistics unless query - identifiers are calculated. This can be done by enabling or using a third-party module that - computes its own query identifiers. Note that all statistics tracked - by this module must be reset if the query identifier method is changed. - - - - When pg_stat_statements is loaded, it tracks + When pg_stat_statements is active, it tracks statistics across all databases of the server. To access and manipulate these statistics, the module provides views pg_stat_statements and diff --git a/doc/src/sgml/release-14.sgml b/doc/src/sgml/release-14.sgml index c4df401c686..bad12860924 100644 --- a/doc/src/sgml/release-14.sgml +++ b/doc/src/sgml/release-14.sgml @@ -3181,10 +3181,12 @@ Author: Bruce Momjian Move query hash computation from pg_stat_statements to the core server (Julien Rouhaud) + -- cgit v1.2.3