0

We use Postgres. After setting log_statement=all, it'll only log queries from psql, not from the application accessing it via JDBC.

I find this a bit counter-intuitive. Isn't ~95% of data access in an application done via JDBC (or something similar in other languages)?

In articles about HIPAA implementation, it's recommemded to set log_statement=all. What purpose will this serve if majority of data access wouldn't be logged at all?

What queries should we log (or should we log them at all?) Should we use something like log4jdbc? Or is log_statement=all enough?

Akshay Elavia
  • 426
  • 1
  • 5
  • 13
  • Where do you set `log_statement=all`? If you set it in the psql session, of course it won't affect other connections. I hope you've got more experienced people there, because you'll be violating HIPAA a lot if this is the first thing that you stumbled on. – Kayaman Mar 28 '17 at 10:14
  • 1
    If you changed `log_statement` in `postgresql.conf` (and reloaded the config), Postgres will log **all** queries regardless from where they come. You probably changed that in the wrong location – a_horse_with_no_name Mar 28 '17 at 10:32
  • 1
    I'm voting to close this question as off-topic because it is not about programming, but about interpretation of law. Contact a lawyer. – Mark Rotteveel Mar 28 '17 at 10:50
  • Hi Kayaman and a_horse_with_no_name, thank you so much for your help! Found my mistake. I was setting log_statement=all in the psql session. – Akshay Elavia Mar 28 '17 at 10:51

0 Answers0