How to analyze PostgreSQL logs?

Posted on July 28, 2009
Filed Under PostgreSQL | Leave a Comment

Sometimes you need to analyze what actually is hitting your database. It could be due to poor performance or just maybe for improvement purposes. Whatever is the reason, here are the options that I enable to achieve this:

Edit postgresql.conf file and enable the following options:

The comments in that file are quite sufficient to understand and change values according to your need. Once you’re done, don’t forget to restart PostgreSQL.

After that just tail -f postgresql-2009-07-20.log and maybe throw some grep and/or grep -v

Comments

Leave a Reply