PostgreSQL / R2DBC PostgreSQL
Landed upstreamCorrectnessLanded Jul 3, 2026

Use non-blocking DNS resolution for client connections

Moved r2dbc-postgresql client connections away from a custom DefaultNameResolver-backed path and onto Reactor Netty's non-blocking DNS resolver configuration while preserving round-robin address selection.

pgjdbc/r2dbc-postgresql · #724

Problem

Issue GH-721 reported five-second connection stalls from DNS resolution blocking the Netty event loop. The driver used BalancedResolverGroup, which delegated hostname lookup to Netty's DefaultNameResolver and could stall unrelated in-flight requests on the same event loop.

Approach

Opened PR #724 to configure ReactorNettyClient with Reactor Netty's resolver provider and roundRobinSelection(true), removing the custom resolver group. Upstream landed the authored change with maintainer polish that inlined the resolver configuration and closed both GH-721 and PR #724.

Impact and scope

  • Removes a blocking DNS lookup path from a reactive PostgreSQL driver used in latency-sensitive R2DBC applications.
  • Preserves multi-address round-robin behavior while using Reactor Netty's non-blocking resolver stack.
  • Landed in the 1.1.3.RELEASE milestone, making the fix part of an upstream release train.

Validation

  • PR validation included targeted ReactorNettyClientUnitTests and the full Maven test suite reported in the PR body.
  • Maintainer review accepted the direction, applied the authored commit, and added a small follow-up polish commit.
  • GitHub issue metadata now closes GH-721 through the landed upstream commit and references PR #724.