From: | <ogjunk-pgjedan(at)yahoo(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Logging long queries: not all get logged |
Date: | 2006-05-10 16:34:25 |
Message-ID: | 20060510163425.1873.qmail@web50305.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I'm running PG 8.0.3. I'm trying to catch slow queries, so I have this in postgresql.conf:
# log queries that take more than 500 ms
log_min_duration_statement = 500 # in ms
This does log _some_ queries that take > 500 ms to run.
However, it looks like not all queries get logged!
And I think I spotted a pattern:
Queries that DO get logged are:
- queries run using psql
- queries run by the java app that uses JDBC to talk to my PG database
Queries that do NOT get logged are:
- queries run by the java app that uses Hibernate to talk to my PG database
If this is not the right place to ask about this (because there is java/Hibernate in the game), please let me know where I should ask.
However, as far as I know, all of the above queries end up hitting the PG server the same way. In other words, the PG server should see all these queries the same way -- there is no distinction between psql, JDBC, and Hibernate queries from the point of view of PG server, so it's really bizzare that not all slow queries get logged.
Has anyone seen this behaviour before?
Are there logging fixes in PG 8.1.3 that might address this issue?
Thanks,
Otis
From | Date | Subject | |
---|---|---|---|
Next Message | mcelroy, tim | 2006-05-10 16:54:55 | Re: backups |
Previous Message | Scott Marlowe | 2006-05-10 16:11:53 | Re: backups |