Recent Changes - Search:

A collection of useful facts by Joel Williams. Adelaide denizen. Computer tinkerer. Former terrestrial ecology student of Flinders University. PhD candidate at ANU. Editor for freshmeat.net. Adelaide University Mountain Club member and outdoor enthusiast. Occasional networking go-to guy.

Contact me by email at joel at this domain.

Postgre SQL Logging

If you're dealing with recalcitrant black-box software, it sometimes helps to look at the database queries being made to figure out how (and why!) it does things. Here's how to enable query logging.

Edit postgresql.conf (sometimes found in /var/lib/pgsql/data) and add these lines:

 log_statement = true
 syslog = 1
 syslog_facility = 'LOCAL0'
 syslog_ident = 'postgres'

Configure syslog appropriately and restart the services!

Edit - History - Print - Recent Changes - Search
Page last modified on September 07, 2010, at 10:10 PM