Re: audit table containing Select statements submitted - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: audit table containing Select statements submitted
Date
Msg-id 20060515191718.GD26212@pervasive.com
Whole thread Raw
In response to Re: audit table containing Select statements submitted  (Douglas McNaught <doug@mcnaught.org>)
List pgsql-hackers
On Mon, May 15, 2006 at 12:37:34PM -0400, Douglas McNaught wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
> 
> > On Mon, May 15, 2006 at 10:55:43AM -0500, Hogan, James F. Jr. wrote:
> >> Only specific tables.
> >> 
> >> Of the 150 plus existing there are only 8 or 10 that hold sensitive
> >> data.
> >
> > In that case I'd definately go with the suggestion of creating access
> > functions and logging to a table from within them. Just make sure to
> > mark the functions as volatile.
> 
> But what if the user calls the access function, sees the data, then
> issues a ROLLBACK?  The audit record would be rolled back as well (as
> Tom pointed out earlier).
> 
> You could use dblink to log to  a separate audit database, I suppose.

Ooops, forgot about that. Yeah, you'd have to use dblink. If it works
with pgpool performance might not be too horrid.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compression and on-disk sorting
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Compression and on-disk sorting