1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

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 <rjuju123@gmail.com>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20210513002623.eugftm4nk2lvvks3@nol
This commit is contained in:
Alvaro Herrera
2021-05-15 14:13:09 -04:00
parent 30d8bad494
commit cafde58b33
14 changed files with 108 additions and 30 deletions

View File

@@ -18,18 +18,14 @@
<xref linkend="guc-shared-preload-libraries"/> in
<filename>postgresql.conf</filename>, 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 <xref linkend="guc-compute-query-id"/>
is set to <literal>auto</literal> or <literal>on</literal>, or any third-party
module that calculates query identifiers is loaded.
</para>
<para>
The module will not track statistics unless query
identifiers are calculated. This can be done by enabling <xref
linkend="guc-compute-query-id"/> 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.
</para>
<para>
When <filename>pg_stat_statements</filename> is loaded, it tracks
When <filename>pg_stat_statements</filename> is active, it tracks
statistics across all databases of the server. To access and manipulate
these statistics, the module provides views
<structname>pg_stat_statements</structname> and