-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to make calls to `pgagroal_prefill()` consistent around the code and avoid repetitions, there is a new function named `pgagroal_prefill_if_can()` that wraps several checks and does the forking and prefilling. Therefore there is no need to check against the configuration limits and users before calling `pgagroal_prefill()` because `pgagroal_prefill_if_can()` will do by itself. Also `pgagroal_prefill_if_can()` will check for a primary server, and in the case there is none, will avoid issuing the prefill at all. Last, this introduces also the `pgagroal_can_prefill()` function that is used in turn by `pgagroal_prefill_if_can()` and aims at testing the configuration for the presence of limits and users. This function can be used as a condition checker before doing clean-up stuff right before calling `pgagroal_prefill_if_can()`. Close #223
- Loading branch information
1 parent
3eed7c2
commit 69dd2c0
Showing
5 changed files
with
78 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters