Re: PG Log

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Arvind Singh *EXTERN*" <arvindps(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG Log
Date: 2012-03-29 08:49:20
Message-ID: D960CB61B694CF459DCFB4B0128514C207AA920E@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arvind Singh wrote:
> I have queries regarding columns in Postgres CSV Log.
>
> Following is a sample Logline
>
------------------------------------------------------------------------
> 2012-03-28 19:25:47.968
IST,"postgres","stock_apals",2388,"localhost:1898",4f731863.954,6,"SET",
2012-
> 03-28 19:25:47 IST,2/0,0,LOG,00000,"QUERY STATISTICS","! system usage
stats:
> ! 0.047000 elapsed 0.000000 user 0.000000 system sec
> ! [0.078125 user 0.031250 sys total]",,,,,"Select * from stock_apals"
> ,,"ShowUsage, .\src\backend\tcop\postgres.c:4305",""
>
------------------------------------------------------------------------
>
> I am aware of all the data segments except the following
>
------------------------------------------------------------------------
> "! system usage stats:
> ! 0.047000 elapsed 0.000000 user 0.000000 system sec
> ! [0.078125 user 0.031250 sys total]",
>
------------------------------------------------------------------------
>
> What do the number mean, it seems to appear only with a Logline for
SQL statements

These lines are emitted if you set log_statement_stats to "on".

They contain execution statistics for the query. The "user" and "sys"
times are acquired by the getrusage(2) or times(2) system call,
depending
on your operating system (on Windows, GetProcessTimes is used).
You can look at the man page for your system for details.

The values you see are:
wall time, CPU user time and kernel CPU time it took to execute the
query.
The values in brackets are the values accumulated for this database
session.

Yours,
Laurenz Albe

In response to

  • PG Log at 2012-03-29 05:30:50 from Arvind Singh

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gabriele Bartolini 2012-03-29 08:50:58 Re: How to tell if server is in backup mode?
Previous Message Gabriele Bartolini 2012-03-29 08:46:13 Re: How to tell if server is in backup mode?