forked from agroal/pgagroal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[agroal#235] Wrap
pgagroal_prefill()
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 agroal#223
- Loading branch information
Showing
5 changed files
with
77 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