Skip site navigation (1) Skip section navigation (2)

Logging question

From: Steven Erickson <stevererickson(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Logging question
Date: 2005-03-30 20:00:01
Message-ID: 11c11fe05033012006b91fa95@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
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?

pgsql-admin by date

Next:From: DarioDate: 2005-03-30 21:41:43
Subject: postgres 7.2.1 pg_restore large objects
Previous:From: Lee WuDate: 2005-03-30 19:02:03
Subject: Re: Security Release

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group