Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure

From: Marcus Kempe <marcus(dot)kempe(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure
Date: 2022-10-28 04:48:58
Message-ID: CAEnMiFNPqc4C3exjsjXEmWhwQherHZ78gPuBggX67qB60bB_AQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Appreciate the clarifications. The only thing I would then add is that if
we agree that it's unintuitive, this could be better reflected in the
documentation.
Currently the only mention is the following (pgstatstatements.html):
"queries with identical texts might appear as separate entries, if they
have different meanings as a result of factors such as different
search_path settings."

Thanks and best regards,
Marcus Kempe

On Fri, Oct 28, 2022 at 3:28 AM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:

> On Thu, Oct 27, 2022 at 02:28:17PM -0400, Tom Lane wrote:
> > Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> > > On Thu, Oct 27, 2022 at 01:49:18PM +0000, PG Bug reporting form wrote:
> > >> I would have expected both calls to be normalized and fingerprinted
> to one
> > >> and the same queryId.
> >
> > > Agreed, and that's actually a known problem that is currently being
> worked on.
> > > You can look at
> > >
> https://www.postgresql.org/message-id/flat/36e5bffe-e989-194f-85c8-06e7bc88e6f7%40amazon.com
> > > for details about the discussion and in-progress fix.
> >
> > Um ... that seems unrelated. AFAICS the OP is complaining about
> > the fact that '42'::int4::int8 is not identical to '42'::int8.
> > Well, they're not. I seriously doubt that we would or should
> > consider trying to get queryjumble to mask that.
>
> Oh wow I totally misread the bug report, sorry about that. A good night
> sleep
> and a coffee later I see what it's about, and I agree that we shouldn't
> try to
> mask that even if it might seem surprising.
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexey Ermakov 2022-10-28 07:42:10 Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure
Previous Message Julien Rouhaud 2022-10-28 01:28:41 Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure