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.
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.