Обсуждение: Fw: postgres logging

Поиск
Список
Период
Сортировка

Fw: postgres logging

От
Stef
Дата:
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


Re: [SQL] Fw: postgres logging [SOLVED]

От
Stef
Дата:
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. :)

Re: Fw: postgres logging

От
"A.Bhuvaneswaran"
Дата:
> 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

Вложения