Re: Function Logging - Mailing list pgsql-general

From Andrew Bartley
Subject Re: Function Logging
Date
Msg-id 16d934440908162224q32bc6d7fy4c75ff3daae8c2e9@mail.gmail.com
Whole thread Raw
In response to Re: Function Logging  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Function Logging  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Thanks Craig fro you reply,


7.2 does have statement logging from within functions.

How? these are the settings we use in our production environments. (7.2)

debug_level = 2
log_connections = off
log_pid = on
log_timestamp = on
syslog = 0

Why, we use logging fro production problem resolution.

We have been using Postgres for 8 years, hundreds of functions have been written, we have become reliant on logging for production support.

Thanks

Andrew Bartley

PS on this note, how do we log PIDS?  This is another "need to have" for our production systems.  We log user activity and trace DB activity through the PIDS.





2009/8/17 Craig Ringer <craig@postnewspapers.com.au>
On 17/08/2009 10:32 AM, Andrew Bartley wrote:
Hi All,

We have recently upgraded postgres from 7.2 to 8.3.

I am struggling with the logging options when it comes to functions.

How do log statements from within a Function?

A PL/PgSQL function?

You don't, generally.

Perhaps we should back up a step or two. Did you have statement logging within PL/PgSQL functions in 7.2? If so, how? Why do you need statement logging within functions? What are you trying to achieve with it?

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Function Logging
Next
From: Scott Marlowe
Date:
Subject: Re: Generating random unique alphanumeric IDs