Re: Problems around compute_query_id

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Problems around compute_query_id
Date: 2021-04-12 08:43:24
Message-ID: 20210412084324.gv2csxjdnswp7tfv@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 12, 2021 at 03:26:33PM +0800, Julien Rouhaud wrote:
> On Mon, Apr 12, 2021 at 09:20:07AM +0200, Michael Banck wrote:
> >
> > What about log_statement_sample_rate ? Does compute_query_id have the
> > same problem with that?
>
> No, log_statement_sample_rate samples log_min_duration_statements, not
> log_statements so it works as expected.

While on that topic, it's probably worth mentioning that log_duration is now
way more useful if you have the queryid in you log_line_prefix. It avoids to
log the full query text while still being able to know what was the underlying
normalized query by dumping the content of pg_stat_statements.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-04-12 09:19:47 Re: Replication slot stats misgivings
Previous Message Virender Singla 2021-04-12 08:19:04 vacuum freeze - possible improvements