Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds client connection limits to pgcat. This is an important feature because pgcat will start to show undefined behavior once the number of client connections exceeds the number of max file descriptors set at the OS level (1024 by default on most distros). The absence of this feature means that any user that has access to the pgcat instance can essentially DoS the connection pooler by just opening connections until the max file descriptors limit is reached.
Specifically this PR implements client connection limits at the user level and at the pgcat instance level. I am open to separating this into 2 separate PR's (1 for the instance level and one for the user level) but they are highly related sets of functionality and if the system level one were to be merged without the user level one it would mean any one user still has the ability to DoS the connection pooler and deny access to other clients by just maxing out the number of instance level connections.
This solves issue #799.