Lists: | pgsql-adminpgsql-sql |
---|
From: | Stef <svb(at)ucs(dot)co(dot)za> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Cc: | pgsql-sql(at)postgresql(dot)org <pgsql-sql(at)postgresql(dot)org> |
Subject: | Fw: postgres logging |
Date: | 2004-01-23 12:18:53 |
Message-ID: | 20040123141853.3c6457ef.svb@ucs.co.za |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-sql |
Hi all,
I've switched on log_statement in postgresql.conf
for debugging purposes. I tried logging connections
and pids as well, but I need to match up the logged statements
to specific connections.
The postmaster logs to a separate log file, but at the moment
it's impossible to tell which sql comes from which connection.
Is there an easy way to accomplish this?
Kind Regards
Stefan
From: | Stef <svb(at)ucs(dot)co(dot)za> |
---|---|
To: | Stef <svb(at)ucs(dot)co(dot)za> |
Cc: | pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: [SQL] Fw: postgres logging [SOLVED] |
Date: | 2004-01-23 12:50:23 |
Message-ID: | 20040123145023.25e6af79.svb@ucs.co.za |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-sql |
Stef mentioned :
=> The postmaster logs to a separate log file, but at the moment
=> it's impossible to tell which sql comes from which connection.
=> Is there an easy way to accomplish this?
Erm... sorry ,
It appears my postgresql.conf is not an original. It didn't have
the log_pid option in. :)
From: | "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net> |
---|---|
To: | Stef <svb(at)ucs(dot)co(dot)za> |
Cc: | pgsql-admin(at)postgresql(dot)org, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Fw: postgres logging |
Date: | 2004-01-24 05:11:35 |
Message-ID: | 1074921094.1630.1.camel@Bhuvan.bksys.co.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-sql |
> The postmaster logs to a separate log file, but at the moment
> it's impossible to tell which sql comes from which connection.
> Is there an easy way to accomplish this?
>
The PID of the connected process is prepended to every log statement.
You can make use of this to know which sql comes from which connection.
Regards,
A.Bhuvaneswaran