Quantcast

per user logging

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

per user logging

snacktime
I'm pretty sure the answer to this is no, but just in case I've missed something.  Is there a way to configure the server so it only logs for specific users? 

Chris
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: per user logging

Peter Eisentraut-2
snacktime wrote:
> I'm pretty sure the answer to this is no, but just in case I've
> missed something. Is there a way to configure the server so it only
> logs for specific users?

No, but you can configure PostgreSQL to insert the user name into each
log message, and then you could configure your syslog daemon to
redirect (or delete) messages according to that user name.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: per user logging

Richard Huxton
In reply to this post by snacktime
snacktime wrote:
> I'm pretty sure the answer to this is no, but just in case I've missed
> something. Is there a way to configure the server so it only logs for
> specific users?

Look into "ALTER USER" - that lets you set (some) configuration options
on a per-user level. Don't know if the logging is one of the things you
can change though. Be interested in finding out though (hint, hint).

--
   Richard Huxton
   Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: per user logging

Tom Lane-2
In reply to this post by Peter Eisentraut-2
Peter Eisentraut <[hidden email]> writes:
> snacktime wrote:
>> I'm pretty sure the answer to this is no, but just in case I've
>> missed something. Is there a way to configure the server so it only
>> logs for specific users?

> No, but you can configure PostgreSQL to insert the user name into each
> log message, and then you could configure your syslog daemon to
> redirect (or delete) messages according to that user name.

I believe it is possible for a superuser to do something like
"ALTER USER victim SET log_min_messages = whatever", so that the
log verbosity is different for different users.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: per user logging

snacktime


I believe it is possible for a superuser to do something like
"ALTER USER victim SET log_min_messages = whatever", so that the
log verbosity is different for different users.

                        regards, tom lane

I'll try that and see how it works.

Loading...