-
Check version, determine which config file to edit
-
SELECT version(); -
PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0, 64-bit -
sudo nano /etc/postgresql/12/main/postgresql.conf -
Find
REPORTING AND LOGGINGsection and change following settings -
log_statement = 'all' -
Reload configuration from command line
SELECT pg_reload_conf(); -
Tail log file
tail -f /var/log/postgresql/postgresql-12-main.log
- Comment out
log_statementline SELECT pg_reload_conf();