pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedindentifying the database in a Postgres log file.
2+ messages / 2 participants
[nested] [flat]
* indentifying the database in a Postgres log file.
@ 2004-12-15 23:48 Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
2004-12-16 00:09 ` Re: indentifying the database in a Postgres log file. Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Theo Galanakis @ 2004-12-15 23:48 UTC (permalink / raw)
To: pgsql-performance
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.
Regards,
Theo
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: indentifying the database in a Postgres log file.
2004-12-15 23:48 indentifying the database in a Postgres log file. Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
@ 2004-12-16 00:09 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2004-12-16 00:09 UTC (permalink / raw)
To: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>; +Cc: 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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-12-16 00:09 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-15 23:48 indentifying the database in a Postgres log file. Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
2004-12-16 00:09 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox