pg_sqlog is an extension that provides SQL interface to the PostgreSQL logs
through the csvlog logging mechanism. It has special functions to extract
the query duration, to group similar (prepared) statements together and to
measure autovacuum and autoanalyze runs for a given day.
https://github.com/kouber/pg_sqlog
--
Kouber Saparev