PGCon2011 - Final (2011.06.11)

PGCon 2011
The PostgreSQL Conference

Speakers
Gabrielle Roth
Schedule
Day Talks - 1 - 2011-05-19
Room DMS 1140
Start time 16:30
Duration 01:00
Info
ID 292
Event type Lecture
Track DBA
Language used for presentation English
Feedback

PostgreSQL Logging

How to get the most out of your activity log

Logs can tell you a lot about what's going on in your database: which user logged in when, what queries they ran and how long they took, when the database restarted. We'll walk through the various logging configuration options PostgreSQL offers to help you figure out how to get what you need in a format that's useful to you. We'll also talk about what to do with your logs once you have them (hint: you don't have to stay up at night reading through them!) and, time permitting, wrap up with a group discussion.

Logging is an important part of your database monitoring suite, providing historical information for troubleshooting and forensic purposes: which user logged in when, what queries they ran and how long they took, when the database restarted. PostgreSQL offers different file format, message format, and message content options for logging. These options can be kind of overwhelming for the first-time user. We'll walk through the various configuration parameters to help you figure out how to get what you need in a format that's useful to you. Then we'll discuss some solutions (pgFouine and friends) for extracting information from your logs. If there's time, I really like to have a group discussion at the end of my talks - so bring your configs, logs, and war stories!