Search Postgresql Archives

Re: log_statement per table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Mar 4, 2014 at 9:19 PM, David Janssens <david.j@xxxxxxxxxxxxx> wrote:
Hello,
I would like to log statements that modify a small subset of tables in a databases.
(not all tables, because the log files become too big in that case and I also worry about performance)
I currently use log_statement='mod' but I didn't find a way to limit this to the set of tables I want.
What is the best way to do this?

Not sure if this solution would help or may be you have already looked at this possibility.

If you know which user is performing the activities on those tables, you can look at the possibility of setting the log_statement='all' at a user level by saying "alter role <username> set log_statement='all' ". This would log all the statements executed by that particular user. You can think of doing this if you think do not end up having a big logfile.

Or

In my experience, i have configured a separate user with separate set of logging mechanism and use to monitor all the activities performed by that user.

Venkata Balaji N

Sr. Database Administrator
Fujitsu Australia 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux