Re: compute_query_id and pg_stat_statements

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Christoph Berg <myon(at)debian(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: compute_query_id and pg_stat_statements
Date: 2021-04-26 16:31:35
Message-ID: 20210426163135.GU20766@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> On Mon, Apr 26, 2021 at 05:34:30PM +0200, Christoph Berg wrote:
> > Re: Peter Eisentraut
> > > > Agreed. If pg_stat_statements were zero-configuration today then
> > > > this would be an annoying new burden, but it isn't.
> > >
> > > I think people can understand "add pg_stat_statements to
> > > shared_preload_libraries" and "install the extension". You have to turn it
> > > on somehow after all.
> >
> > Fwiw, I'd claim that pg_stat_statements *is* zero-configuration today.
> > You just have to load the module (= shared_preload_libraries), and it
> > will start working. Later you can run CREATE EXTENSION to actually see
> > the stats, but they are already being collected in the background.
> >
> > > Now there is the additional burden of turning on this weird setting that no
> > > one understands. That's a 50% increase in burden.
> > >
> > > And almost no one will want to use a nondefault setting.
> > >
> > > pg_stat_statements is pretty popular. I think leaving in this requirement
> > > will lead to widespread confusion and complaints.
> >
> > Ack, please make the default config (i.e. after setting shared_preload_libraries)
> > do something sensible. Having to enable some "weird" internal other setting
> > will be very hard to explain to users.
> >
> > Fwiw, I'd even want to have pg_stat_statements enabled in core by
> > default. That would awesome UX. (And turning off could be as simple as
> > setting compute_query_id=off.)
>
> Techically, pg_stat_statements can turn on compute_query_id when it is
> loaded, even if it is 'off' in postgresql.conf, right? And
> pg_stat_statements would know if an alternate hash method is being used,
> right?

+1 on this approach. I agree that we should avoid having to make every
new user and every user who is upgrading with pg_stat_statements
installed have to go twiddle this parameter.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2021-04-26 16:42:28 Re: Does rewriteTargetListIU still need to add UPDATE tlist entries?
Previous Message Bruce Momjian 2021-04-26 16:21:04 Re: compute_query_id and pg_stat_statements