feat: add pqsql configs for open and idle connections (#1583)

When Postgres is used as the backing database for headscale,
it does not set a limit on maximum open and idle connections
which leads to hundreds of open connections to the Postgres
server.

This commit introduces the configuration variables to set those
values and also sets default while opening a new postgres connection.
This commit is contained in:
Pallab Pain 2024-02-09 22:04:28 +05:30 committed by GitHub
parent 91bb85e7d2
commit 9047c09871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 287 additions and 242 deletions

View file

@ -46,6 +46,7 @@ after improving the test harness as part of adopting [#1460](https://github.com/
- Added the possibility to manually create a DERP-map entry which can be customized, instead of automatically creating it. [#1565](https://github.com/juanfont/headscale/pull/1565)
- Change the structure of database configuration, see [config-example.yaml](./config-example.yaml) for the new structure. [#1700](https://github.com/juanfont/headscale/pull/1700)
- Old structure is now considered deprecated and will be removed in the future.
- Adds additional configuration for PostgreSQL for setting max open, idle conection and idle connection lifetime.
## 0.22.3 (2023-05-12)