I have some questions and would like help.
(1) Audit practice
Is there a good source of information about audit for postgresql
databases?
Specifically I'd like some advice on these:
(2) Associating a statement with a database connection
I'm logging statements and connections, but it seems the statement is not
associated with the connection in the log.
- log_connections = true
- log_statement = true
connection received: host=128.91.23.43 port=35644
query: SELECT ID, ....
Is there a way to associate them so I know which statement came from which
connection?
(3) Associating a web connection with a database connection
Also, if I have a web frontend for the database, what would be the best
practice to associate a statement with a particular web client IP?
For example, I have in the postgresql log
connection received: host=128.91.23.43 port=35644
where 128.91.23.43 is my web server.
The web server log records all client connections and accessed pages, but
I don't have a good method of associating the web client connections with
the database client connections.
I'd appreciate any pointers.
Regards,
Ben Kim
Database Developer/Systems Administrator
434E Harrington Tower / College of Education
Texas A&M University