Skip to content
  • Stan Hu's avatar
    Move PostgreSQL runtime logging configuration to runtime.conf · 22420d18
    Stan Hu authored
    As discussed in
    https://gitlab.com/gitlab-com/gl-infra/production/issues/1704, 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)
    ```
    22420d18