You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that means we can handle increasing of the max_size, since we don't have (yet) connections and we can allow min_size to grow up to initial_size (if set).
This should be safe because pgagroal_reload_configuration calls a pass to pgagroal_validate_configuration, so in the case the limits have changed in a way that is not applicable, e.g., max_size greater than the total number of connections, the validation phase should catch it and a restart/reconfiguration would be required anyway.
The text was updated successfully, but these errors were encountered:
Rethink a little about this, probably only the e.max_size < n.max_size could not trigger a restart, because for min_size it would be better to check about established connections, so it should be something like e.min_size < n.min_size && n.min_size < e.initial_size && n.min_size < current_connections.
In other words, it looks to me something it is not worth investing at this moment.
While working on #329 I noted that the function
restart_limit
notifies that a restart is required pretty much everytime a single limit changes: https://github.com/agroal/pgagroal/blob/master/src/libpgagroal/configuration.c#L2843.I think we could maybe relax a little this, for example, assuming the same limit entry, a restart could not be required if:
e.max_size < n.max_size
or
e.min_size < n.min_size && n.min_size <= e.initial_size
that means we can handle increasing of the
max_size
, since we don't have (yet) connections and we can allowmin_size
to grow up toinitial_size
(if set).This should be safe because
pgagroal_reload_configuration
calls a pass topgagroal_validate_configuration
, so in the case the limits have changed in a way that is not applicable, e.g.,max_size
greater than the total number of connections, the validation phase should catch it and a restart/reconfiguration would be required anyway.The text was updated successfully, but these errors were encountered: