Re: Request regarding logs

From: adb <adb(at)Beast(dot)COM>
To: Jean-Christophe Boggio <cat(at)thefreecat(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Request regarding logs
Date: 2001-03-07 00:40:57
Message-ID: Pine.GSO.4.10.10103061638110.2561-100000@hairdini.beast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think there's an option to log the pid in postgresql.conf in 7.1
log_pid = true

Alex.

On Wed, 7 Mar 2001, Jean-Christophe Boggio wrote:

>
> 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
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mathijs Brands 2001-03-07 00:47:23 Re: [SQL] Undefined symbol
Previous Message Jean-Christophe Boggio 2001-03-07 00:35:16 Request regarding logs