Re: compute_query_id and pg_stat_statements
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, Pavel Stehule <pavel.stehule@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Magnus Hagander <magnus@hagander.net>, Michael Paquier <michael@paquier.xyz>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Stephen Frost <sfrost@snowman.net>, Bruce Momjian <bruce@momjian.us>, Christoph Berg <myon@debian.org>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-15T00:10:17Z
Lists: pgsql-hackers
On Fri, May 14, 2021 at 07:50:13PM -0400, Alvaro Herrera wrote: > +++ b/doc/src/sgml/config.sgml > @@ -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 <literal>off</literal>. > + must be always disabled. > + Valid values are <literal>off</literal> (always disabled), > + <literal>on</literal> (always enabled) and <literal>auto</literal>, > + which let modules such as <xref linkend="pgstatstatements"/> > + automatically enable it. > + The default is <literal>auto</literal>. which lets > +/* True when a module requests query IDs and they're set auto */ > +bool query_id_enabled = false; Does "they're" mean the GUC compute_query_id ? > +/* > + * This should only be called if IsQueryIdEnabled() > + * return true. > + */ > JumbleState * > JumbleQuery(Query *query, const char *querytext) Should it Assert() that ? Maybe you should update this too ? doc/src/sgml/release-14.sgml
Commits
-
Allow compute_query_id to be set to 'auto' and make it default
- cafde58b337e 14.0 landed
-
Move pg_stat_statements query jumbling to core.
- 5fd9dfa5f50e 14.0 cited