feat: add db-pool-timeout alias

For db-pool-max-idletime
This commit is contained in:
steve-chavez
2023-05-22 18:34:18 -03:00
committed by Steve Chavez
parent 38ad8c04e1
commit 009250006e
4 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- #2786, Limit idle postgresql connection lifetime - @robx
+ New option `db-pool-max-idletime` (default 30s).
+ This is equivalent to the old option `db-pool-timeout`
of PostgREST 10.0.0.
+ This is equivalent to the old option `db-pool-timeout` of PostgREST 10.0.0.
+ A config alias for `db-pool-timeout` is included.
## [11.0.1] - 2023-04-27
+2 -1
View File
@@ -230,7 +230,8 @@ parser optPath env dbSettings roleSettings =
<*> (fromMaybe 10 <$> optInt "db-pool")
<*> (fromMaybe 10 <$> optInt "db-pool-acquisition-timeout")
<*> (fromMaybe 1800 <$> optInt "db-pool-max-lifetime")
<*> (fromMaybe 30 <$> optInt "db-pool-max-idletime")
<*> (fromMaybe 30 <$> optWithAlias (optInt "db-pool-timeout")
(optInt "db-pool-max-idletime"))
<*> (fmap toQi <$> optWithAlias (optString "db-pre-request")
(optString "pre-request"))
<*> (fromMaybe True <$> optBool "db-prepared-statements")
+1
View File
@@ -1,4 +1,5 @@
db-schema = "provided_through_alias"
db-pool-timeout = 5
max-rows = 1000
pre-request = "check_alias"
role-claim-key = ".aliased"
+1 -1
View File
@@ -7,7 +7,7 @@ db-plan-enabled = false
db-pool = 10
db-pool-acquisition-timeout = 10
db-pool-max-lifetime = 1800
db-pool-max-idletime = 30
db-pool-max-idletime = 5
db-pre-request = "check_alias"
db-prepared-statements = true
db-root-spec = "open_alias"