From: ogjunk-pgjedan@yahoo.com
To: pgsql-admin@postgresql.org
Subject: Logging long queries: not all get logged
Date: Wed, 10 May 2006 09:34:25 -0700 (PDT)
Message-ID: <20060510163425.1873.qmail@web50305.mail.yahoo.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: ogjunk-pgjedan@yahoo.com
Subject: Re: Logging long queries: not all get logged
In-Reply-To: <20060510163425.1873.qmail@web50305.mail.yahoo.com>
References: <20060510163425.1873.qmail@web50305.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox