Re: How to get back 7.0.x log format

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to get back 7.0.x log format
Date: 2001-12-01 23:21:18
Message-ID: 3C0965EE.1090403@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Hannu Krosing <hannu(at)tm(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2001-12-01 23:39:54 Re: WAS: [Fwd: PostgreSQL new commands proposal]
Previous Message Sergio Pili 2001-12-01 23:21:00 Re: WAS: [Fwd: PostgreSQL new commands proposal]