hi,
is there any way, one could spent some time to allow *full* pid-stamping
in logs?
right now logs look like:
[5703] LOG: query: select *
from
pg_class
WHERE
relname='pg_class';
[5703] LOG: QUERY STATISTICS
! system usage stats:
! 0.028300 elapsed 0.000000 user 0.000000 system sec
! [0.020000 user 0.010000 sys total]
! 0/0 [0/0] filesystem blocks in/out
! 9/7 [305/148] 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: 3 read, 0 written, buffer hit rate = 96,55%
! Local blocks: 0 read, 0 written, buffer hit rate = 0,00%
! Direct blocks: 0 read, 0 written
and what i'd like to see is something like:
[5703] LOG: query: select *
[5703] from
[5703] pg_class
[5703] WHERE
[5703] relname='pg_class';
[5703] LOG: QUERY STATISTICS
[5703] ! system usage stats:
[5703] ! 0.028300 elapsed 0.000000 user 0.000000 system sec
[5703] ! [0.020000 user 0.010000 sys total]
[5703] ! 0/0 [0/0] filesystem blocks in/out
[5703] ! 9/7 [305/148] page faults/reclaims, 0 [0] swaps
[5703] ! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
[5703] ! 0/0 [0/0] voluntary/involuntary context switches
[5703] ! postgres usage stats:
[5703] ! Shared blocks: 3 read, 0 written, buffer hit rate = 96,55%
[5703] ! Local blocks: 0 read, 0 written, buffer hit rate = 0,00%
[5703] ! Direct blocks: 0 read, 0 written
this is very imporant if you want to make tuning of existing system,
written by someone else, and you have (by looking at pgsql logs) to
check what queries are being run most often, and which of them use most
of time.
the problem is that with heavily loaded systems, queries overlap, and
one cannot know which statistics are for which query, and even which
line is for which query!!!
unfortunatelly my c-knowledge is too limited to try to do it by myself.
depesz
--
hubert depesz lubaczewski http://www.depesz.pl/
------------------------------------------------------------------------
Mój Boże, spraw abym milczał, dopóki się nie upewnię, że naprawdę mam
coś do powiedzenia. (c) 1998 depesz