pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow compute_query_id to be set to 'auto' and make it default
4+ messages / 2 participants
[nested] [flat]

* pgsql: Allow compute_query_id to be set to 'auto' and make it default
@ 2021-05-15 18:14 Alvaro Herrera <alvherre@alvh.no-ip.org>
  2021-05-15 18:43 ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Alvaro Herrera @ 2021-05-15 18:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cafde58b337e007cb6a719f5ab4dd6459d932a39

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c    |  6 ++++
contrib/pg_stat_statements/pg_stat_statements.conf |  1 -
doc/src/sgml/config.sgml                           |  9 +++--
doc/src/sgml/pgstatstatements.sgml                 | 14 +++-----
doc/src/sgml/release-14.sgml                       |  2 ++
src/backend/commands/explain.c                     |  2 +-
src/backend/parser/analyze.c                       |  4 +--
src/backend/postmaster/postmaster.c                |  3 ++
src/backend/tcop/postgres.c                        |  2 +-
src/backend/utils/misc/guc.c                       | 38 ++++++++++++++++------
src/backend/utils/misc/postgresql.conf.sample      |  2 +-
src/backend/utils/misc/queryjumble.c               | 21 ++++++++++++
src/include/utils/guc.h                            |  1 -
src/include/utils/queryjumble.h                    | 33 +++++++++++++++++--
14 files changed, 108 insertions(+), 30 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default
  2021-05-15 18:14 pgsql: Allow compute_query_id to be set to 'auto' and make it default Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2021-05-15 18:43 ` Tom Lane <tgl@sss.pgh.pa.us>
  2021-05-15 19:16   ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2021-05-15 18:43 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Allow compute_query_id to be set to 'auto' and make it default

culicidae seems unhappy:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae&dt=2021-05-15%2018%3A20%3A08

/mnt/resource/andres/bf/culicidae/HEAD/pgsql.build/../pgsql/src/backend/postmaster/postmaster.c: In function \342\200\230save_backend_variables\342\200\231:
/mnt/resource/andres/bf/culicidae/HEAD/pgsql.build/../pgsql/src/backend/postmaster/postmaster.c:6172:33: error: \342\200\230auto_query_id_enabled\342\200\231 undeclared (first use in this function)
 6172 |  param->auto_query_id_enabled = auto_query_id_enabled;
      |                                 ^~~~~~~~~~~~~~~~~~~~~
/mnt/resource/andres/bf/culicidae/HEAD/pgsql.build/../pgsql/src/backend/postmaster/postmaster.c:6172:33: note: each undeclared identifier is reported only once for each function it appears in
/mnt/resource/andres/bf/culicidae/HEAD/pgsql.build/../pgsql/src/backend/postmaster/postmaster.c: In function \342\200\230restore_backend_variables\342\200\231:
/mnt/resource/andres/bf/culicidae/HEAD/pgsql.build/../pgsql/src/backend/postmaster/postmaster.c:6406:2: error: \342\200\230auto_query_id_enabled\342\200\231 undeclared (first use in this function)
 6406 |  auto_query_id_enabled = param->auto_query_id_enabled;
      |  ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [../../../src/Makefile.global:920: postmaster.o] Error 1

Not sure why it's only that animal.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default
  2021-05-15 18:14 pgsql: Allow compute_query_id to be set to 'auto' and make it default Alvaro Herrera <alvherre@alvh.no-ip.org>
  2021-05-15 18:43 ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-05-15 19:16   ` Tom Lane <tgl@sss.pgh.pa.us>
  2021-05-15 19:18     ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2021-05-15 19:16 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

I wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> Allow compute_query_id to be set to 'auto' and make it default

> culicidae seems unhappy: ...
> Not sure why it's only that animal.

Oh ... EXEC_BACKEND, likely, seeing that the Windows animals
are going red as well.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default
  2021-05-15 18:14 pgsql: Allow compute_query_id to be set to 'auto' and make it default Alvaro Herrera <alvherre@alvh.no-ip.org>
  2021-05-15 18:43 ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Tom Lane <tgl@sss.pgh.pa.us>
  2021-05-15 19:16   ` Re: pgsql: Allow compute_query_id to be set to 'auto' and make it default Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-05-15 19:18     ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2021-05-15 19:18 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

On 2021-May-15, Tom Lane wrote:

> I wrote:
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> >> Allow compute_query_id to be set to 'auto' and make it default
> 
> > culicidae seems unhappy: ...
> > Not sure why it's only that animal.
> 
> Oh ... EXEC_BACKEND, likely, seeing that the Windows animals
> are going red as well.

Yeah, pushed a fix now.

-- 
Álvaro Herrera       Valdivia, Chile





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2021-05-15 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 18:14 pgsql: Allow compute_query_id to be set to 'auto' and make it default Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-05-15 18:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-05-15 19:16   ` Tom Lane <tgl@sss.pgh.pa.us>
2021-05-15 19:18     ` Alvaro Herrera <alvherre@alvh.no-ip.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox