Postgres set pool size - #163
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a small API convenience to override the Postgres connection pool size in an existing Settings value (targeting use cases like readiness probes that should not contend with the main request pool), and publishes it as part of a new nri-postgresql release.
Changes:
- Add
Postgres.Settings.setPoolSize(re-exported asPostgres.setPoolSize) to override pool size and reset stripes to 1. - Add unit tests covering
setPoolSizebehavior. - Bump package version to
0.4.1.0and update changelog + golden output to match.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| nri-postgresql/src/Postgres/Settings.hs | Introduces setPoolSize and exports it from the Settings module. |
| nri-postgresql/src/Postgres.hs | Re-exports setPoolSize from the public Postgres module API. |
| nri-postgresql/test/PostgresSettingsSpec.hs | Adds a unit test ensuring setPoolSize updates size, resets stripes, and preserves other fields. |
| nri-postgresql/package.yaml | Bumps package version to 0.4.1.0. |
| nri-postgresql/nri-postgresql.cabal | Bumps cabal version to 0.4.1.0. |
| nri-postgresql/CHANGELOG.md | Documents the new Postgres.setPoolSize API in a new release entry. |
| nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-9 | Updates golden output for the new version string and shifted source locations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
omnibs
approved these changes
Aug 25, 2026
omnibs
left a comment
Member
There was a problem hiding this comment.
Looks good. Thank you for pushing this forward.
TIL stripes are a thing. Don't seem useful in our context so ok to hard code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a way to override the pool size to be used in a
Postgres.connectionbased on aSettingsobject.Intended use case: use a small separate fixed-size pool for readiness checks, so these don't compete with requests for DB connections.
See https://noredink.slack.com/archives/C0ARKCTNLUE/p1787592700111799
Part of PDE-4.