Open zxwsbg opened 2 months ago
Please can you post a line from your csvlog with a query and auto_explain output ?
Please can you post a line from your csvlog with a query and auto_explain output ?
csv output :
2024-05-15 11:54:08.146 UTC,"postgres","postgres",13215,"[local]",6644a260.339f,1,"SELECT",2024-05-15 11:54:08 UTC,3/2,0,LOG,00000,"duration: 52.114 ms plan:
Query Text: select * from t where a=32;
Gather (cost=1000.00..10633.43 rows=1 width=4) (actual time=0.270..52.105 rows=1 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on t (cost=0.00..9633.33 rows=1 width=4) (actual time=31.724..48.541 rows=0 loops=3)
Filter: (a = 32)
Rows Removed by Filter: 333333",,,,,,,,"explain_ExecutorEnd, auto_explain.c:422","psql","client backend",,0
And my stderr output:
2024-05-15 11:56:33.470 UTC [15449] LOG: 00000: duration: 51.182 ms plan:
Query Text: select * from t where a=32;
Gather (cost=1000.00..10633.43 rows=1 width=4) (actual time=0.265..51.173 rows=1 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on t (cost=0.00..9633.33 rows=1 width=4) (actual time=31.170..47.669 rows=0 loops=3)
Filter: (a = 32)
Rows Removed by Filter: 333333
My command is
pgbadger -q postgresql-15-11.csv(log) -o a.html -j 8
I set following params:
And I found pgbadger can't parse CSV format LOG pretyfully.
When I change log_destination to 'stderr', pgbadger can parse LOG correctly.