Logging long queries: not all get logged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux