From: reda-alaoui (@reda-alaoui) <noreply+reda-alaoui@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: Sat, 17 Oct 2026 09:54:20 +0000
Message-ID: <gh-pgjdbc-pgjdbc-3964-rc4302270689@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-3964-rc3972654738@github.com>
References: <gh-pgjdbc-pgjdbc-3964@github.com>
<gh-pgjdbc-pgjdbc-3964-rc3972654738@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Fixed in 02dbb7a7: these messages are gone. Instead of `isXxxSupported()` next to setters that throw, the accessor now has `findTcpKeepCountOption(Socket)` (and the same for idle and interval). It returns a `@Nullable ExtendedSocketIntOption` bound to that socket, so the only way to set or read an option is through a support check. The Java 8 variant returns `null` and throws nothing, so these three lines were deleted rather than reworded.
- `GT.tr`: nothing is left to wrap. An unsupported option now only produces the existing `WARNING` log in `TcpKeepSettings`, which isn't exception text.
- That warning names the connection property (`property.getName()`, e.g. `tcpKeepAliveCount`), not the JDK option.
- "only supported from JDK 11 onwards" is gone too. The accessor Javadoc now says only that support depends on the JDK, the operating system and the socket implementation.