Conference Schedule - PGConf NYC 2021

Pglog: a flexible log analyser

Level: Intermediate

As a consultant, I always end up in production systems running for some time and I have to quickly grasp how the cluster is running. Most of the time I don't have direct access to production, so my best shot is to get the logfiles and analyse them.

I tried other logs analyser tools, I even tried grep, sed, tr... but I always ended up being frustrating because it was not flexible enough: each production server is specific and needs specific investigations.

That's when I begun using Postgres on my laptop to analyse logs. First, simply with a file foreign data wrapper, then using copy and creating materialized views to make it quicker.

I developed several "standard" reports about autovacuum, slow queries, checkpoint, temp files, errors... And then, when you have enough information to know where you need to dig, you can perform SQL on top of your logs to have a better analysis.

This session is a presentation of that tool which is Open Source (under the PostgreSQL licence).

Speaker

Lætitia Avrot