Skip to content

Commit

Permalink
[agroal#234] pgagroal-cli reload transfer also log_rotation settings
Browse files Browse the repository at this point in the history
When issuing a `pgagroal-cli reload` all `log_rotation` related
settings such as `log_rotation_age` and `log_rotation_size` must be
cloned into the reloaded configuration.

This also clone the `log_line_prefix` string to the new "reloaded"
configuration.

Close agroal#234
  • Loading branch information
fluca1978 committed May 12, 2022
1 parent 6c7418d commit 803ed84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libpgagroal/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -2684,6 +2684,9 @@ transfer_configuration(struct configuration* config, struct configuration* reloa
config->log_connections = reload->log_connections;
config->log_disconnections = reload->log_disconnections;
restart_int("log_mode", config->log_mode, reload->log_mode);
config->log_rotation_size = reload->log_rotation_size;
config->log_rotation_age = reload->log_rotation_age;
memcpy(config->log_line_prefix, reload->log_line_prefix, MISC_LENGTH);
/* log_lock */

config->authquery = reload->authquery;
Expand Down

0 comments on commit 803ed84

Please sign in to comment.