logs of postgresql and pid-stamping. possible improvement?

Поиск
Список
Период
Сортировка
От Hubert depesz Lubaczewski
Тема logs of postgresql and pid-stamping. possible improvement?
Дата
Msg-id 20020815094840.GA5688@depesz.pl
обсуждение исходный текст
Ответы Re: logs of postgresql and pid-stamping. possible improvement?  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-general
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


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgaccess error message
Следующее
От: "Linn Kubler"
Дата:
Сообщение: Re: Problem with Now()?