Re: Logging long queries: not all get logged

Поиск
Список
Период
Сортировка
От Chris Browne
Тема Re: Logging long queries: not all get logged
Дата
Msg-id 60mzdpaddp.fsf@dba2.int.libertyrms.com
обсуждение исходный текст
Ответ на Logging long queries: not all get logged  (<ogjunk-pgjedan@yahoo.com>)
Ответы Re: Logging long queries: not all get logged  (<ogjunk-pgjedan@yahoo.com>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: backups
Следующее
От: Kenji Morishige
Дата:
Сообщение: Re: limiting number of connections from specific host or by user