From: Dan Fitzpatrick Date: 2008-02-07T00:59:11+09:00 Subject: Re: Looking for libraries to monitor postgres queries Gian Holland wrote: > Problem is I am not the system admin and he wont turn on logging, claims > there is a performance hit > > Yeah there is definitely a performance hit on logging every query. What are you trying to accomplish? I assume you are using Ruby for your app. If so, you can othe query execution method of your db lib and capture the query at that point and log it to a file before it hits the DB server. If you are trying to log queries from other apps (that you don't control), then I think you will have to use db logging or use a db proxy like http://sqlrelay.sourceforge.net/ or http://pgpool.projects.postgresql.org/. If all the apps use the proxy, then the proxy can do the logging. (of course you may need that same admin to set this up.) Dan