darold / pgbadger

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

Usernames being parsed incorrectly, including SSL information #714

Closed caseyandgina closed 2 years ago

caseyandgina commented 2 years ago

With pgBadger 11.6, I see usernames like "pgbench SSL enabled (protocol=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384, bits=256, compression=off)" showing up in the "Connections by User" table. I tried switching to CSV logs, and still am seeing the same thing. The username shows up correctly for queries on the Top tab.

Here's an actual example log entry for a connection:

2022-02-08 19:00:02.937 EST,"app_caseytest","caseytest",820557,"10.226.191.11:52486",62030402.c854d,2,"authentication",2022-02-08 19:00:02 EST,3/9,0,LOG,00000,"connection authorized: user=app_caseytest database=caseytest application_name=pgbench SSL enabled (protocol=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384, bits=256, compression=off)",,,,,,,,,"","client backend"
darold commented 2 years ago

Good catch, commit 3b03a6c fixes this issue. Thanks.