> 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?
You might want to look at trigger based audit logs.
Some example code, and a couple of useful packages:
I don't know about the other packages, but I would recommend against "tablelog". While I'm happy with what it does (once hand-patched to work with modern versions of the server), it is an abandoned project with no apparent avenue for reviving it. I wouldn't recommend becoming dependent on such "living dead" software if you are not already.