Request regarding logs

From: Jean-Christophe Boggio <cat(at)thefreecat(dot)org>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Request regarding logs
Date: 2001-03-07 00:35:16
Message-ID: 11427444494.20010307013516@thefreecat.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


When you log pg's activity with statistics enabled you can get this
kind of report :

StartTransactionCommand
query: select * from identity where login='cat';
ProcessQuery
! system usage stats:
! 0.012632 elapsed 0.010000 user 0.000000 system sec
! [0.030000 user 0.010000 sys total]
! 0/0 [0/0] filesystem blocks in/out
! 49/55 [309/285] page faults/reclaims, 0 [0] swaps
! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
! 0/0 [0/0] voluntary/involuntary context switches
! postgres usage stats:
! Shared blocks: 21 read, 0 written, buffer hit rate = 93.27%
! Local blocks: 0 read, 0 written, buffer hit rate = 0.00%
! Direct blocks: 0 read, 0 written
CommitTransactionCommand

The problem is when you have many queries every second, you get all
the lines mixed up : several queries can start before the first
gives the result. And so the stats are useless in production.

Would it be possible to have a unique identifier in the "query:" line
and another one at the beginning of the stats ? Maybe the backend's
PID ? The goal is to write some code to analyze the stats and :
- calculate global stats
- point out the bad queries (and produce the explain plan with the
report)

I posted nearly the same message a few days ago and was surprised not
seeing any answer. I wonder if the question is too stupid and if so
please, someone enlighten me ? Maybe it was meaningless, this
is why I tried to say things differently. My apologies for the ~repost

--
Jean-Christophe Boggio
cat(at)thefreecat(dot)org
Independant Consultant and Developer
Delphi, Linux, Perl, PostgreSQL

Responses

Browse pgsql-general by date

  From Date Subject
Next Message adb 2001-03-07 00:40:57 Re: Request regarding logs
Previous Message Mathijs Brands 2001-03-07 00:09:46 Re: [SQL] Re: Re: MySQLs Describe emulator!