Create log file with SQL statements for only one database I have two Postgres databases. Can I write in a log file SQL statements only for one of them?
Carefully reading the Error Reporting and Logging documentation, and specially, the section When to Log, you will find the following configuration parameters, that allows you not to log anything:

log_min_messages = 'PANIC'


You should add this parameter to your postgresql.conf file; and (most probably) restart the service.

For the single database whose info you want to log, connect to that database and execute:

ALTER DATABASE database_where_you_want_to_log
    SET log_min_messages = 'WARNING';  /* or whichever level you need */


This allows you to have one default (not to log anything) for most of your databases and one exception for a single one.