Thread: Fw: postgres logging

Fw: postgres logging

From
Stef
Date:
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


Attachment

Re: Fw: postgres logging [SOLVED]

From
Stef
Date:
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. :)

Attachment

Re: [ADMIN] Fw: postgres logging

From
"A.Bhuvaneswaran"
Date:
> 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