Действия
Изменеие параметров postgresql 9.4+ в runtime¶
На примере включения опций логгирования¶
Включить:¶
postgres=# ALTER SYSTEM SET log_duration = on; ALTER SYSTEM postgres=# ALTER SYSTEM SET log_connections = on; ALTER SYSTEM postgres=# ALTER SYSTEM SET log_disconnections = on; ALTER SYSTEM postgres=# ALTER SYSTEM SET log_statement = 'all'; ALTER SYSTEM postgres=# ALTER SYSTEM SET log_temp_files = 0; ALTER SYSTEM postgres=# SELECT pg_reload_conf();
Отключить:¶
postgres=# ALTER SYSTEM RESET log_duration; ALTER SYSTEM postgres=# ALTER SYSTEM RESET log_connections; ALTER SYSTEM postgres=# ALTER SYSTEM RESET log_disconnections; ALTER SYSTEM postgres=# ALTER SYSTEM RESET log_statement; ALTER SYSTEM postgres=# ALTER SYSTEM RESET log_temp_files; ALTER SYSTEM postgres=# SELECT pg_reload_conf();
Изменения сохраняются в postgresql.auto.conf¶
# Do not edit this file manually! # It will be overwritten by ALTER SYSTEM command. log_duration = 'on' log_connections = 'on' log_disconnections = 'on' log_statement = 'all' log_temp_files = '0'
Обновлено Андрей Волков почти 7 года назад · 2 изменени(я, ий)