Re: How to get back 7.0.x log format
От | Hannu Krosing |
---|---|
Тема | Re: How to get back 7.0.x log format |
Дата | |
Msg-id | 3C0965EE.1090403@tm.ee обсуждение исходный текст |
Ответ на | How to get back 7.0.x log format (Hannu Krosing <hannu@tm.ee>) |
Список | pgsql-hackers |
Tom Lane wrote: >Hannu Krosing <hannu@tm.ee> writes: > >>I vaguely remember that 7.0.x logged both "query start" and "query end" >>times, no ? >> > >I do not think that any logging ability got removed between 7.0 and 7.1. > IIRC It was possible to determine how long a _certain_ query took in 7.0.x. > > regards, tom lane > Ok, I found the statistics flags too, but how am I to tell which stats go to which query ? I think that having backend pid in QUERY STATISTICS should be enough to help out. 2001-12-02 04:12:39 [7369] DEBUG: query: select count(*) from item i1,item i2; 2001-12-02 04:12:43 [7311] DEBUG: query: select count(*) from item; QUERY STATISTICS ! system usage stats: ! 0.005394 elapsed 0.010000 user 0.000000 system sec ! [0.040000 user 0.020000 sys total] ! 0/0 [0/0] filesystem blocks in/out ! 0/2 [282/197] 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: 0 read, 0 written, buffer hit rate = 100.00% ! Local blocks: 0 read, 0 written, buffer hit rate = 0.00% ! Direct blocks: 0 read, 0 written QUERY STATISTICS ! system usage stats: ! 21.127781 elapsed 7.470000 user 0.010000 system sec ! [7.480000 user 0.050000 sys total] ! 0/0 [0/0] filesystem blocks in/out ! 15/6 [267/196] 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: 8 read, 0 written, buffer hit rate = 99.84% ! Local blocks: 0 read, 0 written, buffer hit rate = 0.00% ! Direct blocks: 0 read, 0 written I can't even figure this out by time elapsed, as I don't know when the stats were written ------------------------------- Hannu
В списке pgsql-hackers по дате отправления: