Re: An obsolete comment of pg_stat_statements

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: rjuju123(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: An obsolete comment of pg_stat_statements
Date: 2021-12-24 06:32:10
Message-ID: 20211224.153210.47060871929261388.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 22 Nov 2021 22:50:04 +0800, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote in
> On Mon, Nov 22, 2021 at 2:48 PM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> >
> > At Mon, 22 Nov 2021 15:38:23 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> > > * queryId is supposed to be a valid value, otherwise this function dosen't
> > > * calucate it by its own as before then returns immediately.
> >
> > Mmm. That's bad. This is the correted version.
> >
> > * queryId is supposed to be a valid value, otherwise this function doesn't
> > * calculate it by its own as before then returns immediately.
>
> Ah good catch! Indeed the semantics changed and I missed that comment.
>
> I think that the new comment should be a bit more precise about what
> is a valid value and should probably not refer to a previous version
> of the code. How about something like:
>
> - * If queryId is 0 then this is a utility statement for which we couldn't
> - * compute a queryId during parse analysis, and we should compute a suitable
> - * queryId internally.
> + * If queryId is 0 then no query fingerprinting source has been enabled, so we
> + * act as if the extension was disabled: silently exit without doing any work.
> *

Thanks! Looks better. It is used as-is in the attached.

And I will register this to the next CF.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Fix-a-function-comment.patch text/x-patch 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-12-24 07:23:13 Re: sequences vs. synchronous replication
Previous Message Kyotaro Horiguchi 2021-12-24 06:00:44 Re: Be clear about what log_checkpoints emits in the documentation