Search code examples
postgresqlloggingdebian

Postgresql settings not changing after editing postgresql.conf file. Postgresql 13. Debian 11


Empirically, it was revealed that the parameters log_min_duration_statement = 0 and logging_collector = on are indeed set in the pg_settings table. But the parameters in the pg_settings table do not react to changes in postgresql.conf. After changing postgresql.conf, postgresql restarted with the systemctl restart postgresql command. In the postgresql.conf file parameter logging_collector = off.


Solution

  • There are some simple possible mistakes that you could have made:

    • edit the wrong postgresql.conf

    • restart the wrong server

    If you can rule out these explanations, the setting from postgresql.conf must have been overridden somewhere else. Find out where with

    SELECT name, setting, source, sourcefile, sourceline
    FROM pg_settings
    WHERE name IN ('logging_collector', 'log_min_duration_statement');
    

    The last three columns tell you where the setting originates.