Elizabeth Christensen saves some information:
A modern-day Postgres instance creates robust and comprehensive logs for nearly every facet of database and query behavior. While Postgres logs are the go-to place for finding and debugging critical errors, they are also a key tool in application performance monitoring.
Today let’s get set up with logging for Postgres – starting with the basics of what to log, how to log what you want, and as reward for your hard work – how to use these to monitor and improve performance. The Postgres docs on logs are excellent, so please consult those for the most up to date and comprehensive configurations. This blog reads between the lines a bit beyond the docs to offer some practical advice and settings. As always, your mileage may vary.
Click through for several tips and a lot of information on the topic of logging.