From: ogjunk-pgjedan@yahoo.com
To: pgsql-admin@postgresql.org
Subject: Re: Logging long queries: not all get logged
Date: Wed, 10 May 2006 16:24:35 -0700 (PDT)
Message-ID: <20060510232435.95625.qmail@web50302.mail.yahoo.com> (raw)
In-Reply-To: <60mzdpaddp.fsf@dba2.int.libertyrms.com>
Hi Chris,
I'm pretty sure (I do no timing on the Hibernate/java/app side). I changed the config to:
# log queries that take more than 1 ms
log_min_duration_statement = 1 # in ms
Still nothing in the log :) (I did ctl_reload the postmaster)
Simon Riggs confirmed this is a known bug in another email, and 8.1.* should contain a fix. Good excuse to move to 8.0*.
Or does anyone know if 8.2 is around the corner? (coming in days or a few weeks?)
Thanks,
Otis
----- Original Message ----
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-admin@postgresql.org
Sent: Wednesday, May 10, 2006 3:28:02 PM
Subject: Re: [ADMIN] Logging long queries: not all get logged
ogjunk-pgjedan@yahoo.com writes:
> 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
We occasionally have run into seemingly the same issue.
Question:
Are you certain that the queries are taking longer than 500ms for
PostgreSQL to process them?
Or are you merely certain that Hibernate is reporting that it took
longer than that for *it* to process them?
We have had Java applications which would report spurious "slow"
queries any time the garbage collector had to do any significant
amount of work.
It could be that the garbage collector is causing Hibernate to stall
while processing its logging, thereby incorrectly reporting that
database queries are running slow...
--
(reverse (concatenate 'string "gro.gultn" "@" "enworbbc"))
http://cbbrowne.com/info/finances.html
The only problem
with Haiku is that you just
get started and then
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
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: <20060510232435.95625.qmail@web50302.mail.yahoo.com>
References: <60mzdpaddp.fsf@dba2.int.libertyrms.com> <20060510232435.95625.qmail@web50302.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