Re: compute_query_id and pg_stat_statements

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: magnus(at)hagander(dot)net, masao(dot)fujii(at)oss(dot)nttdata(dot)com, michael(at)paquier(dot)xyz, andres(at)anarazel(dot)de, tgl(at)sss(dot)pgh(dot)pa(dot)us, alvherre(at)alvh(dot)no-ip(dot)org, sfrost(at)snowman(dot)net, bruce(at)momjian(dot)us, myon(at)debian(dot)org, peter(dot)eisentraut(at)enterprisedb(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: compute_query_id and pg_stat_statements
Date: 2021-05-13 02:02:45
Message-ID: 20210513020245.wjswdvzmasfxrbqs@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 13, 2021 at 10:51:52AM +0900, Kyotaro Horiguchi wrote:
> At Thu, 13 May 2021 09:59:43 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> > How about adding a GUC_INTERNAL "current_query_provider" or such?
>
> On the second thought, I wonder why we don't just call JumbleQuery in
> pgss_post_parse_analyze when compute_query_id is "off".

Because not generating a query_id for a custom query_id implementation is a
valid use case for queries that are known to lead to huge pg_stat_statements
overhead, as I mentioned in [1]. For the record I implemented that in
pg_queryid (optionally don't generate query_id for queries referencing a temp
relation) yesterday evening as a POC for that approach.

[1]: https://www.postgresql.org/message-id/20210512081445.axosz3xf7ydrhe7o@nol

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-05-13 02:04:54 Re: Always bump PG_CONTROL_VERSION?
Previous Message Michael Paquier 2021-05-13 02:00:58 Re: Remove "FROM" in "DELETE FROM" when using tab-completion