Skip to content

Add UsePostgres overload for data source configuration#35

Merged
Theauxm merged 1 commit intomainfrom
perf/scalability-fixes
Mar 17, 2026
Merged

Add UsePostgres overload for data source configuration#35
Theauxm merged 1 commit intomainfrom
perf/scalability-fixes

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented Mar 17, 2026

Summary

  • Add UsePostgres(connectionString, configureDataSource) overload that exposes NpgsqlDataSourceBuilder for tuning connection pool size, timeouts, multiplexing, and other Npgsql settings
  • The configure action runs after Trax registers its enum mappings but before Build()
  • Existing UsePostgres(string) delegates to the new overload with null

Cross-repo: part of the perf/scalability-fixes branch across Trax.Scheduler, Trax.Api, and Trax.Docs.

Test plan

  • UsePostgres with configure action doesn't throw
  • UsePostgres with configure action still registers DbContextFactory
  • UsePostgres with null configure action matches default behavior
  • All 306 existing tests pass

Adds UsePostgres(connectionString, configureDataSource) so users can
tune connection pool size, timeouts, and other Npgsql settings without
encoding them in the connection string.
@Theauxm Theauxm merged commit 2274b93 into main Mar 17, 2026
1 check passed
@Theauxm Theauxm deleted the perf/scalability-fixes branch March 17, 2026 17:39
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented Mar 17, 2026

This PR is included in version 1.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant