darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.55k stars 352 forks source link

PG14 introduces globally queryid for normalized queries #677

Closed fljdin closed 3 years ago

fljdin commented 3 years ago

With PostgreSQL 14, a new wildcard %Q will be available through log_line_prefix parameter. See Move pg_stat_statements query jumbling to core.

This query identifier could be a great alternative to internal normalize_query function in pgBadger, roughly more accurate. Could it be possible to group queries from this identifier?

Regards

darold commented 3 years ago

Hi, commit 808d22f adds the detection of this new placeholder in the log line prefix. For the moment it does nothing, I don't see a real use of this value in pgbadger outside perhaps being displayed with the Top sample queries for log search.