Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/0-release-notes/WPB-25325
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The PostgreSQL connection pool implementation was switched to `hasql-resource-pool`.
The `agingTimeout` setting is now ignored and should be treated as deprecated.
Pool metrics now include acquisition/session latency.
2 changes: 0 additions & 2 deletions charts/elasticsearch-index/templates/migrate-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ spec:
- {{ .Values.postgresqlPool.size | quote }}
- --pg-pool-acquisition-timeout
- {{ .Values.postgresqlPool.acquisitionTimeout | quote }}
- --pg-pool-aging-timeout
- {{ .Values.postgresqlPool.agingTimeout | quote }}
- --pg-pool-idleness-timeout
- {{ .Values.postgresqlPool.idlenessTimeout | quote }}
{{- if hasKey $.Values.secrets "pgPassword" }}
Expand Down
1 change: 0 additions & 1 deletion charts/elasticsearch-index/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ postgresql:
postgresqlPool:
size: 100
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m

postgresMigration:
Expand Down
3 changes: 0 additions & 3 deletions charts/wire-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ galley:
postgresqlPool:
size: 100
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m

# Not used if enableFederation is false
Expand Down Expand Up @@ -968,7 +967,6 @@ background-worker:
postgresqlPool:
size: 5
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m

# Setting this to `true` will start conversation migration to postgresql.
Expand Down Expand Up @@ -1132,7 +1130,6 @@ brig:
postgresqlPool:
size: 100
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m

emailSMS:
Expand Down
11 changes: 0 additions & 11 deletions docs/src/developer/reference/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1939,15 +1939,6 @@ config:
# Connection acquisition timeout.
acquisitionTimeout: 10s

# Maximal connection lifetime.
#
# Determines how long is available for reuse. After the timeout passes and
# an active session is finished the connection will be closed releasing a
# slot in the pool for a fresh connection to be established.
#
# This is useful as a healthy measure for resetting the server-side caches.
agingTimeout: 1d

# Maximal connection idle time.
idlenessTimeout: 10m
secrets:
Expand All @@ -1965,7 +1956,6 @@ postgresql:
postgresqlPool:
size: 100
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m
postgresqlPassword: /path/to/pgPassword # refers to a PostgreSQL password file
```
Expand Down Expand Up @@ -2194,7 +2184,6 @@ postgresql:
postgresqlPool:
size: 5
acquisitionTimeout: 10s
agingTimeout: 1d
idlenessTimeout: 10m

# Start migration workers when true
Expand Down
18 changes: 18 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@
url = "github:wireapp/hsaml2/use-crypton-asn1";
flake = false;
};

hasql-resource-pool = {
# Update this to the upstream repo/rev once the PR is merged there.
Comment thread
battermann marked this conversation as resolved.
# https://github.com/avanov/hasql-resource-pool/pull/6
url = "github:wireapp/hasql-resource-pool?rev=5b5d3df0fff81801986a0110acae5420215f01c5";
flake = false;
};
};

outputs = inputs@{ nixpkgs, nixpkgs_24_11, flake-utils, tom-bombadil, sbomnix, ... }:
Expand Down
6 changes: 2 additions & 4 deletions libs/extended/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
, errors
, exceptions
, hasql
, hasql-pool
, hasql-resource-pool
, hspec
, hspec-discover
, http-client
Expand Down Expand Up @@ -49,7 +49,6 @@
, transformers
, types-common
, unliftio
, uuid
, wai
}:
mkDerivation {
Expand All @@ -72,7 +71,7 @@ mkDerivation {
errors
exceptions
hasql
hasql-pool
hasql-resource-pool
http-client
http-client-tls
http-types
Expand All @@ -96,7 +95,6 @@ mkDerivation {
transformers
types-common
unliftio
uuid
wai
];
testHaskellDepends = [
Expand Down
3 changes: 1 addition & 2 deletions libs/extended/extended.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ library
, errors
, exceptions
, hasql
, hasql-pool
, hasql-resource-pool
, http-client
, http-client-tls
, http-types
Expand All @@ -127,7 +127,6 @@ library
, transformers
, types-common
, unliftio
, uuid
, wai

default-language: GHC2021
Expand Down
Loading
Loading