darold / pgbadger

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

Wrong parsing of numbers values inside bind queries #685

Closed massimo-sala closed 3 years ago

massimo-sala commented 3 years ago

Hi

We moved from PG 8.4 to PG 11.13 and from pgbadger 11.4 to 11.5. I am not sure when this problem arose.

Under QUERIES --> Slowest individual queries the listed values are all wrong.

Plase see the attached files.

This is the log configuration from postgresql.conf The destination is the default stderr.

logging_collector = on
log_checkpoints = on
log_connections = on
log_disconnections = on
log_filename = 'postgresql.log'
log_truncate_on_rotation = off
# exclude the logging of DETAIL, HINT, QUERY, and CONTEXT information
log_error_verbosity = terse
log_line_prefix = '%t [%p]: user=%u,db=%d,app=%a,client=%h '
log_lock_waits = on
log_min_duration_statement = 1000
log_statement = 'ddl'
log_temp_files = 0

pgbadger options:

PGBADGER_OPTS="--jobs 2 --quiet --anonymize --nocomment --noreport --exclude-db postgres"
PGBADGER_OPTS="$PGBADGER_OPTS --dns-resolv --begin '$TODAY 07:00:00' --end '$TODAY 21:00:00'"
PGBADGER_OPTS="$PGBADGER_OPTS --prefix '%t [%p]: user=%u,db=%d,app=%a,client=%h '"

The cause is an incorrect configuration or a pgbadger bug? Best regards, Sala

postgresql slowest queries.log

pgbadger_slowest_queries
massimo-sala commented 3 years ago

SOLVED

We used the option --anonymize