Skip to content

Fix #6694 avoid LISTEN initialization in send-only Postgres channel paths#9254

Open
michaelstaib wants to merge 1 commit intomainfrom
mst/issue-6694
Open

Fix #6694 avoid LISTEN initialization in send-only Postgres channel paths#9254
michaelstaib wants to merge 1 commit intomainfrom
mst/issue-6694

Conversation

@michaelstaib
Copy link
Member

Summary

  • add regression coverage proving SendAsync should not initialize the listen connection in send-only scenarios
  • split PostgresChannel initialization tracking into channel-listener and writer initialization
  • update SendAsync to initialize only the writer connection, avoiding LISTEN startup in non-GraphQL background sender processes

Fixes #6694

Test Commands

  • dotnet test src/HotChocolate/Core/test/Subscriptions.Postgres.Tests/HotChocolate.Subscriptions.Postgres.Tests.csproj --filter "FullyQualifiedName~SendAsync_Should_Not_Initialize_ListenConnection_When_SendOnly"
    • Repro before fix: failed on net8/net9/net10 with Assert.Single() Failure: The collection contained 2 items
    • After fix: passed on net8/net9/net10
  • dotnet test src/HotChocolate/Core/test/Subscriptions.Postgres.Tests/HotChocolate.Subscriptions.Postgres.Tests.csproj --no-build
    • Passed on net8/net9/net10 (Failed: 0, Passed: 74, Skipped: 0)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) 3288.48 0.00%
Ramping 2 (0-500-0 VUs) 3886.61 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 1.13ms 12.25ms 14.93ms 24.29ms 34.00ms 257.57ms
Ramping 2 1.36ms 51.35ms 56.44ms 98.59ms 139.93ms 283.75ms

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) 784.90 0.00%
Ramping 2 (0-500-0 VUs) 913.22 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 12.09ms 54.85ms 61.54ms 78.96ms 97.47ms 736.57ms
Ramping 2 2.92ms 202.71ms 225.79ms 467.05ms 521.41ms 798.99ms

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) 5954.01 0.00%
Ramping 2 (0-500-0 VUs) 5129.95 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 0.15ms 7.84ms 8.30ms 13.76ms 16.86ms 59.93ms
Ramping 2 0.19ms 40.35ms 44.77ms 83.07ms 107.62ms 229.04ms

Runner 2 = benchmarking-2

Run 22490365189 • Commit 0f2f83b • Fri, 27 Feb 2026 14:43:27 GMT

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgres Subscriptions - listen should only happen in graphql projects

1 participant