0

Is it possible to log queries executed only on a particular database in postgresql?

One possible solution is to log the database name, and finally grep them. Would be helpful if there is a better approach, as the log generated is humongous that grep is not very convenient.

1 Answer 1

1

The contrib module pg_stat_statements would be able to do that:

http://www.postgresql.org/docs/current/static/pgstatstatements.html

Because it only tracks statements for the database where the module was installed.

Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.