Skip to content

Reset all connections with PostgreSQL when the server restarts#5216

Merged
akshaymankar merged 15 commits into
developfrom
hasql-conn-reset
May 13, 2026
Merged

Reset all connections with PostgreSQL when the server restarts#5216
akshaymankar merged 15 commits into
developfrom
hasql-conn-reset

Conversation

@akshaymankar
Copy link
Copy Markdown
Member

@akshaymankar akshaymankar commented May 5, 2026

https://wearezeta.atlassian.net/browse/WPB-25203

Upstream issue: nikita-volkov/hasql-pool#54

More things to do:

  • Replace all uses of use with functions from Wire.Postgres.
  • Figure out if this is really the right thing to do
    In case case multiple connections realize the need for reset at once, we'd be resetting multiple times, is this really ok?
    This is fine because using release only marks already acquired connections to be released, in case there is a race it can make the racing connections to be released very quickly, but I think its not such a big problem because it would max make the whole pool reconnect once, which isn't so bad.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label May 5, 2026
@akshaymankar akshaymankar changed the title Hasql conn reset Reset all connections with PostgreSQL when the server restarts May 5, 2026
@akshaymankar akshaymankar marked this pull request as ready for review May 11, 2026 15:15
@akshaymankar akshaymankar requested review from a team as code owners May 11, 2026 15:15
Comment thread libs/wire-subsystems/src/Wire/ConversationStore/Migration.hs
Comment thread nix/haskell-pins.nix
Comment thread libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs
@akshaymankar akshaymankar merged commit 28c58a0 into develop May 13, 2026
10 checks passed
@akshaymankar akshaymankar deleted the hasql-conn-reset branch May 13, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants