From: Steven Erickson <stevererickson@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Logging question
Date: Wed, 30 Mar 2005 14:00:01 -0600
Message-ID: <11c11fe05033012006b91fa95@mail.gmail.com> (raw)
Because of customer requirements, I need to log all database modifying
SQL, including the data itself, to a text file. This file will be
protected to prevent all but a small, select number of users from
viewing because of the secure nature of the data. They also want
postgres status messages (startup, shutdown, non-sql errors) to be
logged in syslog.
Is there a way to configure postgresql.conf to do this? As I see it,
postgresql.conf can be set to log to syslog and stderr, where stderr
can be redirected to some other location. However, the entries will
be the same.
Is the only solution to log only to syslog, and only for errors, and
put the SQL logging in the application? Or, can a stored procedure be
called by a 'trigger after' that could write the SQL to a flat file?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: stevererickson@gmail.com
Subject: Re: Logging question
In-Reply-To: <11c11fe05033012006b91fa95@mail.gmail.com>
References: <11c11fe05033012006b91fa95@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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