Skip to content

Move PostgreSQL runtime logging configuration to runtime.conf

Stan Hu requested to merge sh-postgresql-log-settings-runtime into master

As discussed in gitlab-com/gl-infra/production#1704 (closed), many of the logging parameters can be changed at runtime. Those that have a context of sighup can be reloaded with a SIGHUP and not require a full database restart.

gitlabhq_development=# select name, context from pg_settings where name like 'log_%' order by context;
            name             |      context
-----------------------------+-------------------
 logging_collector           | postmaster
 log_checkpoints             | sighup
 log_destination             | sighup
 log_directory               | sighup
 log_autovacuum_min_duration | sighup
 log_file_mode               | sighup
 log_filename                | sighup
 log_hostname                | sighup
 log_line_prefix             | sighup
 log_rotation_age            | sighup
 log_rotation_size           | sighup
 log_timezone                | sighup
 log_truncate_on_rotation    | sighup
 log_lock_waits              | superuser
 log_min_duration_statement  | superuser
 log_min_error_statement     | superuser
 log_min_messages            | superuser
 log_parser_stats            | superuser
 log_planner_stats           | superuser
 log_replication_commands    | superuser
 log_statement               | superuser
 log_statement_stats         | superuser
 log_duration                | superuser
 log_error_verbosity         | superuser
 log_executor_stats          | superuser
 log_temp_files              | superuser
 log_disconnections          | superuser-backend
 log_connections             | superuser-backend
(28 rows)
Edited by GitLab Release Tools Bot

Merge request reports

Loading