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.