pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
Date: Wed, 09 Sep 2026 20:20:23 +0000
Message-ID: <gh-pgjdbc-pgjdbc-3964-rc3972654795@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-3964@github.com>
References: <gh-pgjdbc-pgjdbc-3964@github.com>

(on .github/workflows/matrix.mjs)

**This will fail on Windows.** The `-D` properties do reach the driver — `TestUtil.mergeDefaultProperties` hands `System.getProperties()` to `DriverManager.getConnection` wholesale, no allow-list — so combined with the `isSupported()` problem, every `windows-latest` job on JDK 11-21 with `keep_alive=yes` fails at connect. Over 40 matrix generations that combination was 7.1% of jobs (17 of 240).

That is the axis earning its keep rather than a reason to weaken it, so the fix belongs in the driver: once an unsupported option is ignored with a warning, as libpq does, this line needs no platform gating at all. If setting an unsupported option stays fatal, the gating has to cover the OS as well as the JDK — see the comment on the axis for the `imply`/`exclude` pair and for splitting `yes` into `on` and `tuned`.

Two things to change here regardless. `-DtcpKeepAlive=true` does not belong behind the `java_version >= 11` check: it has worked since forever, so Java 8 jobs titled `keep_alive` currently exercise nothing. And `v.java_version >= 11` is NaN-false for the early-access row, so `-ea` never reaches this branch; `:341` shows the idiom that handles that.

`-DtcpKeepAliveInterval=1` is the most aggressive value the option takes — `10` keeps the death window at 90 seconds, still two orders of magnitude below the stock `7200 + 9*75`, without inventing flakiness that looks like a driver bug.

view thread (85+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-3964-rc3972654795@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-3964-rc3972654795@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox