From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Theo Galanakis <Theo(dot)Galanakis(at)lonelyplanet(dot)com(dot)au> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: indentifying the database in a Postgres log file. |
Date: | 2004-12-16 00:09:09 |
Message-ID: | 200412160009.iBG099v07993@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Theo Galanakis wrote:
>
> I have written a program that parses a syslog file, reading all the postgres
> transactions. I would like to know if there is a way for postgres to log
> also the specific database the sql statement originated from.
>
> The only options available in the postgresql.conf are:
> #log_connections = false
> #log_duration = false
> #log_pid = false
> #log_statement = false
> #log_timestamp = false
> #log_hostname = false
> #log_source_port = false
>
> Is this possible? Or is there a smart work around.
In pre-8.0 the only way to do it is to log connections, grab the
database from there, and add the pid to join all log rows back to the
server row. In 8.0 we have log_line_prefix that can display all
information.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-12-16 01:30:08 | Re: Partitioned table performance |
Previous Message | Theo Galanakis | 2004-12-15 23:48:06 | indentifying the database in a Postgres log file. |