pg.ddx.io GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)
help / color / mirror / Atom feed[pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
85+ messages / 7 participants
[nested] [flat]
* [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-15 17:09 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
0 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-15 17:09 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Fixes #2487
With `tcpKeepAlive=true` the driver only turns on `SO_KEEPALIVE`, so the operating system's probe settings apply: on Linux the first probe goes out after two hours idle. A firewall or NAT that drops idle connections sooner breaks the connection long before keep-alive notices.
This adds three connection properties, with matching `int` getters and setters on `BaseDataSource` (`-1` means unset):
* `tcpKeepAliveIdle`: idle time in seconds before the first probe
* `tcpKeepAliveInterval`: time in seconds between probes
* `tcpKeepAliveCount`: number of unanswered probes before the connection drops
When unset, the operating system's value applies.
What the caller sees:
* The properties are read and applied only with `tcpKeepAlive=true`, as libpq does with `keepalives_*`.
* They take effect on Linux and macOS from JDK 11, AIX from JDK 21 and Windows from JDK 22. Where the JDK, the operating system or the `socketFactory` socket does not support an option, the driver logs `Ignoring tcpKeepAliveIdle: <socket class> does not support it on Java <version> on <os>` (at WARNING once per property and socket class, at FINE after that) and connects without it.
* A zero or negative value fails the connection with `tcpKeepAliveIdle parameter value must be a positive integer but was: 0`.
* A value the operating system rejects fails the connection with `The operating system rejected tcpKeepAliveIdle=60000: ...`, without marking the host as failed.
Also in this PR:
* `reduced-pom.xml`: source-distribution tests on Java 11+ run against the `META-INF/versions/11` classes, which the Java 11 socket option accessor needs (this also covers `LazyCleanerImpl`).
* CI: a `keep_alive` axis (`no`, `on`, `tuned`) in the test matrix.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 08:38 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 08:38 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Sorry for all the noise, `convert to draft` action is not working :man_shrugging:
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 08:41 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-16 08:41 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
There are two ways to test the new options:
1) Add them to the matrix. Check out https://github.com/pgjdbc/pgjdbc/commit/bd572f408b315aa91739a60e58c2413770c054cd as an example
2) There might be a targeted test for the new option. I'm not sure what could be the way to ensure the settings work as intended.
By the way, do the new settings apply without explicit `SO_KEEPALIVE` activation?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 08:47 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-16 08:47 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Can this be a direct class reference?
I guess it should compile with `--release 11`, so `jdk.net.ExtendedSocketOptions.class` should work here.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 08:53 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 08:53 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
That's what I wanted to do first. But https://github.com/policeman-tools/forbidden-apis made the build fail when I tried.
That's because components of root package `jdk` are not guaranteed to be available in every JDK. See https://docs.oracle.com/en/java/javase/11/docs/api/index.html about JDK:
> The Java Development Kit (JDK) APIs are specific to the JDK and will not necessarily be available in all implementations of the Java SE Platform.
Therefore, unless you want to relax the constraint, I think reflection is needed.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 08:59 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-16 08:59 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
We use the APIs only for the specific socket options, so I'm gravitating to going with direct `ExtendedSocketOptions.FIELD_NAME` usages and just let it fail in the runtime if the JDK misses the option.
We could probably skip the class from forbidden-apis check.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 09:04 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 09:04 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Ok, I will do that.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 09:06 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 09:06 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
> 1. Add them to the matrix. Check out [bd572f4](https://github.com/pgjdbc/pgjdbc/commit/bd572f408b315aa91739a60e58c2413770c054cd) as an example
I don't know if you saw it, I added conditional assertions to `ConnectionTest#pGStreamSettings`.
> By the way, do the new settings apply without explicit `SO_KEEPALIVE` activation?
I didn't find any explicit hint about this in the JDK documentation. Because of that, I didn't want to make any assumption neither in the code nor in this project's documentation.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 09:10 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 09:10 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
But this causes an issue. How to copy socket options in `PGStream` ( https://github.com/pgjdbc/pgjdbc/pull/3964/changes#diff-1c9bbe3aa0c1f2d0d7a6ecef10d981c2be064a526e8f... ) without failure? At this step, we don't know if `ExtendedSocketOptions` have been explicitly required by the library consumer.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 09:30 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 09:30 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
In addition to `ConnectionTest#pGStreamSettings` new assertions, I added `ConnectionTest#socketSettings`. If I understand correctly, `ConnectionTest` will be executed on multiple JDK versions including versions above 11. Therefore, I don't think there is a need to manipulate the matrix configuration. But please tell me if I am wrong.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-16 09:32 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-16 09:32 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui requested a review.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 13:53 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 13:53 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi , I don't think the appveyor failure is caused by my change.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 14:19 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-17 14:19 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
We plan to drop appveyor soon (see https://github.com/pgjdbc/pgjdbc/pull/3966), so please don't pay attention to it
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 14:25 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-17 14:25 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
> I don't know if you saw it, I added conditional assertions to ConnectionTest#pGStreamSettings.
It is fine to add assertions to `ConnectionTest`, however, we'd better ensure all the tests are runnable with `keepalive` on, so I would still like to add keepalive to the matrix.
In fact, we could even configure non-default values for the newly added settings for the recent JDKs we have in our matrix.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 17:14 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 17:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi , I added a `keep_alive` axis to the matrix.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 17:23 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-17 17:23 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on README.md:94)
Please refrain from reformatting the table for adding a couple of rows only
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 17:38 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 17:38 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on README.md:94)
Sorry, I think I slipped on the reformat shortcut of my IDE :)
I reverted the formatting.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 18:18 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 18:18 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi , do you think the CI failure is caused by my change?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 18:51 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-03-17 18:51 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Looks like the change is not related
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 19:38 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 19:38 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Should we mark this one as resolved or do you have a suggestion?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-17 19:38 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-17 19:38 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui requested a review.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-19 08:33 "gitguardian[bot] (bot) (@gitguardian[bot])" <noreply+gitguardian[bot]@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: gitguardian[bot] (bot) (@gitguardian[bot]) @ 2026-03-19 08:33 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
#### οΈβ
There are no secrets present in this pull request anymore.
If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find [here](https://docs.gitguardian.com/platform/remediate/remediate-incidents) more information about risks.
---
<sup><sub>π¦ [GitGuardian](https://dashboard.gitguardian.com/auth/login/?utm_medium=checkruns&utm_source=github&...) detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.<br/></sup></sub>
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-19 16:09 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-19 16:09 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi I guess this failure is also caused by flakiness?
> Java 8, corretto, PG 17, scram, ssl, windows, server_tz America/New_York, client_tz America/New_York, fr_FR, no_gss, replication, slow_tests, adaptive_fetch, rewrite_batch_inserts, query_timeout 15, autosave conservative, cleanupSavepoints
```
org.postgresql.replication.LogicalReplicationTest > replicationRestartFromLastFeedbackPositionParallelTransaction() failure marker
Error: 0,6sec org.postgresql.replication.LogicalReplicationTest > replicationRestartFromLastFeedbackPositionParallelTransaction()
java.lang.AssertionError: When we add feedback about applied lsn to replication stream(in this case it's force update status)after restart consume changes via this slot should be started from last success lsn that we send before via force status update, that why we wait consume both transaction without duplicates
Expected: "BEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT\nBEGIN\ntable public.test_logic_table: INSERT: pk[integer]:2 name[character varying]:'second tx changes'\nCOMMIT"
but: was "BEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT\nBEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.postgresql.replication.LogicalReplicationTest.replicationRestartFromLastFeedbackPositionParallelTransaction(LogicalReplicationTest.java:839)
FAILURE 0,6sec, org.postgresql.replication.LogicalReplicationTest > replicationRestartFromLastFeedbackPositionParallelTransaction()
java.lang.AssertionError: When we add feedback about applied lsn to replication stream(in this case it's force update status)after restart consume changes via this slot should be started from last success lsn that we send before via force status update, that why we wait consume both transaction without duplicates
Expected: "BEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT\nBEGIN\ntable public.test_logic_table: INSERT: pk[integer]:2 name[character varying]:'second tx changes'\nCOMMIT"
but: was "BEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT\nBEGIN\ntable public.test_logic_table: INSERT: pk[integer]:1 name[character varying]:'first tx changes'\nCOMMIT"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.postgresql.replication.LogicalReplicationTest.replicationRestartFromLastFeedbackPositionParallelTransaction(LogicalReplicationTest.java:839)
```
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-20 10:46 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-20 10:46 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Marking it as resolved. But open to suggestions :)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-03-23 21:31 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-03-23 21:31 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Hi @vlsi ,
Are you expecting an action from me?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-04-26 20:02 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-04-26 20:02 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi anything I should do to get this merged? :)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-07-24 07:49 "fwiesweg (@fwiesweg)" <noreply+fwiesweg@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: fwiesweg (@fwiesweg) @ 2026-07-24 07:49 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
I'm very interested in this feature, too, if there's anything I can do to move it forward (like a review, or additional testing, or whatever), please let me know!
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-07-24 11:17 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-07-24 11:17 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
One naming suggestion before this ships, since these constants and property names are new and not yet released, so renaming them now costs nothing in compatibility.
Right now the three new options share only the `tcpKeep` stem with the existing `tcpKeepAlive` toggle. Read in isolation, `tcpKeepCount` is a little ambiguous ("keep count of what?"). I'd suggest grouping all three under the full `tcpKeepAlive` family:
| Concept | This PR | Suggested |
|---|---|---|
| probe count | `tcpKeepCount` / `TCP_KEEP_COUNT` | `tcpKeepAliveCount` / `TCP_KEEP_ALIVE_COUNT` |
| idle before first probe | `tcpKeepIdle` / `TCP_KEEP_IDLE` | `tcpKeepAliveIdle` / `TCP_KEEP_ALIVE_IDLE` |
| interval between probes | `tcpKeepInterval` / `TCP_KEEP_INTERVAL` | `tcpKeepAliveInterval` / `TCP_KEEP_ALIVE_INTERVAL` |
The `BaseDataSource` accessors would follow: `getTcpKeepAliveCount()` / `setTcpKeepAliveCount(Integer)`, and so on.
Reasons:
- It matches how pgjdbc already groups related options under a feature prefix β see the `ssl` family (`ssl`, `sslmode`, `sslcert`, `sslkey`, `sslrootcert`, `sslpassword`). A `tcpKeepAlive` toggle plus `tcpKeepAlive*` sub-options is the same shape, so this follows the existing convention rather than departing from it.
- The prefix also signals the dependency: these three only take effect when `tcpKeepAlive=true` (`SO_KEEPALIVE` must be on). That answers your earlier question about whether they apply without keep-alive being enabled β they don't, and the name now makes that clear. It's worth a note in the docs too, the way libpq documents `keepalives_idle` as applying only when `keepalives` is on.
The tradeoff is that we move further from the JDK constant names (`TCP_KEEPCOUNT` / `TCP_KEEPIDLE` / `TCP_KEEPINTERVAL`) and libpq's `keepalives_*`. That's fine for the user-facing names β pgjdbc already uses its own camelCase and doesn't mirror either. Those JDK names are still the accurate label for the internal `ExtendedSocketOptionAccessor` methods, which wrap the socket options directly, so I'd leave that internal layer as-is and rename only the public surface (`PGProperty` + `BaseDataSource`).
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-07-26 08:44 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-07-26 08:44 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui requested a review.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-07-26 08:44 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-07-26 08:44 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
> One naming suggestion before this ships, since these constants and property names are new and not yet released, so renaming them now costs nothing in compatibility.
>
> Right now the three new options share only the `tcpKeep` stem with the existing `tcpKeepAlive` toggle. Read in isolation, `tcpKeepCount` is a little ambiguous ("keep count of what?"). I'd suggest grouping all three under the full `tcpKeepAlive` family:
>
> Concept This PR Suggested
> probe count `tcpKeepCount` / `TCP_KEEP_COUNT` `tcpKeepAliveCount` / `TCP_KEEP_ALIVE_COUNT`
> idle before first probe `tcpKeepIdle` / `TCP_KEEP_IDLE` `tcpKeepAliveIdle` / `TCP_KEEP_ALIVE_IDLE`
> interval between probes `tcpKeepInterval` / `TCP_KEEP_INTERVAL` `tcpKeepAliveInterval` / `TCP_KEEP_ALIVE_INTERVAL`
> The `BaseDataSource` accessors would follow: `getTcpKeepAliveCount()` / `setTcpKeepAliveCount(Integer)`, and so on.
>
> Reasons:
>
> * It matches how pgjdbc already groups related options under a feature prefix β see the `ssl` family (`ssl`, `sslmode`, `sslcert`, `sslkey`, `sslrootcert`, `sslpassword`). A `tcpKeepAlive` toggle plus `tcpKeepAlive*` sub-options is the same shape, so this follows the existing convention rather than departing from it.
> * The prefix also signals the dependency: these three only take effect when `tcpKeepAlive=true` (`SO_KEEPALIVE` must be on). That answers your earlier question about whether they apply without keep-alive being enabled β they don't, and the name now makes that clear. It's worth a note in the docs too, the way libpq documents `keepalives_idle` as applying only when `keepalives` is on.
>
> The tradeoff is that we move further from the JDK constant names (`TCP_KEEPCOUNT` / `TCP_KEEPIDLE` / `TCP_KEEPINTERVAL`) and libpq's `keepalives_*`. That's fine for the user-facing names β pgjdbc already uses its own camelCase and doesn't mirror either. Those JDK names are still the accurate label for the internal `ExtendedSocketOptionAccessor` methods, which wrap the socket options directly, so I'd leave that internal layer as-is and rename only the public surface (`PGProperty` + `BaseDataSource`).
Done :+1:
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-08-01 07:57 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-08-01 07:57 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Merge conflict fixed
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-08-03 09:34 "codecov[bot] (bot) (@codecov[bot])" <noreply+codecov[bot]@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: codecov[bot] (bot) (@codecov[bot]) @ 2026-08-03 09:34 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
## [Codecov](https://app.codecov.io/gh/pgjdbc/pgjdbc/pull/3964?dropdown=coverage&src=pr&el=h1&utm_med...) Report
:x: Patch coverage is `95.95960%` with `4 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 72.51%. Comparing base ([`b4d04a7`](https://app.codecov.io/gh/pgjdbc/pgjdbc/commit/b4d04a7fd4824c5468f780ae9f057a598458651d?dropdown=cov...)) to head ([`35e0338`](https://app.codecov.io/gh/pgjdbc/pgjdbc/commit/35e0338b8795344d6e2a0ff685b8d49e1008386b?dropdown=cov...)).
:warning: Report is 2 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #3964 +/- ##
============================================
+ Coverage 72.33% 72.51% +0.18%
- Complexity 5484 5520 +36
============================================
Files 244 246 +2
Lines 22193 22307 +114
Branches 3730 3736 +6
============================================
+ Hits 16054 16177 +123
+ Misses 4468 4460 -8
+ Partials 1671 1670 -1
```
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-08-03 09:44 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-08-03 09:44 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
There was a bug leading to class cast exception. I pushed a commit to fix it. @vlsi could you retrigger the build please?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 19:30 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-09-09 19:30 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Ping :)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/PGStream.java)
**Blocker.** These three reads are unconditional, and the surrounding `catch` on line 164 only catches `SocketException`. `UnsupportedOperationException` is not one, so on Windows/JDK 11-21 or behind a `socketFactory` with a custom `SocketImpl` it escapes this constructor β for users who set none of the new properties.
This constructor is the SSL fallback (`enableSSL`, server answers `'E'` to `SSLRequest`, `ConnectionFactoryImpl:712`) and the `gssEncMode=prefer` fallback (`:651`), so the regression reaches people who have never heard of `tcpKeepAliveIdle`.
Also note `getOption` returns the *system default* rather than null when the user configured nothing (measured: 8 / 7200 / 75 on macOS, JDK 21), so the setters below always fire and pin the OS defaults onto the replacement socket. Please read these only when something was actually configured, and gate on `supportedOptions()`.
(I checked the leak question β `tryConnect`'s `catch (Exception e) { closeStream(newStream, e); throw e; }` does close the old stream, because `newStream` is not reassigned when `enableSSL` throws. No leak.)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
**Blocker.** This is the root of most of the review. `socketOption != null` means "the JDK declares the field", and the JDK declares all three unconditionally β it gates only their registration in `supportedOptions()`:
```java
// jdk/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java
public static final SocketOption<Integer> TCP_KEEPCOUNT = new ExtSocketOption<>("TCP_KEEPCOUNT", Integer.class);
...
if (keepAliveOptSupported) {
options.addAll(Set.of(TCP_KEEPCOUNT, TCP_KEEPIDLE, TCP_KEEPINTERVAL));
}
```
`Socket.setOption`/`getOption` throw `UnsupportedOperationException` for anything outside `supportedOptions()`. Demonstrated with `TCP_QUICKACK`, whose field resolves on macOS while the option is unsupported there:
```
field resolved reflectively: TCP_QUICKACK
supportedOptions contains TCP_QUICKACK = false
get THREW java.lang.UnsupportedOperationException: 'TCP_QUICKACK' not supported
set THREW java.lang.UnsupportedOperationException: 'TCP_QUICKACK' not supported
```
Two real populations land exactly here: Windows on JDK 11-21 (keep-alive options arrived on Windows only in JDK 22 β `jdk-21+35:src/jdk.net/windows/classes/jdk/net/WindowsSocketOptions.java` implements `IP_DONTFRAGMENT` only; `keepAliveOptionsSupported0()` came with `f3ade388dac`, "8308593", first in `jdk-22+8`), and any `socketFactory` whose `Socket` has a custom `SocketImpl` (junixsocket and friends), where the default `supportedOptions()` is empty on every platform:
```
supportedOptions=[]
get TCP_KEEPCOUNT THREW java.lang.UnsupportedOperationException: 'TCP_KEEPCOUNT' not supported
```
The test has to be `socket.supportedOptions().contains(socketOption)`, which means the predicate needs the socket β `isTcpKeepCountSupported(Socket)`.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java)
**Blocker, and a contract question.** Three problems in this block.
1. The options are applied regardless of `tcpKeepAlive`, whose default is `false` β so the default configuration is the one where all three are written to the socket and change nothing. libpq does the opposite: `fe-connect.c` applies `setKeepalivesIdle/Interval/Count` only inside the `usekeepalives != 0` branch, and documents it: *"This parameter is ignored for connections made via a Unix-domain socket, or if keepalives are disabled. It is only supported on systems where `TCP_KEEPCNT` or an equivalent socket option is available; on other systems, it has no effect."*
2. On JDK 8 the setter throws a bare `UnsupportedOperationException`, and `openConnectionImpl` catches only `ConnectException`/`IOException`/`SQLException`, so `Driver.connect`'s catch-all turns it into SQLState `99999`. Measured against a live server with the jar built from this branch:
```
FAILED with org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.
caused by java.lang.UnsupportedOperationException: Tuning TCP_KEEPCOUNT is only supported from JDK 11 onwards
at org.postgresql.core.ExtendedSocketOptionAccessorImpl.setTcpKeepCount(ExtendedSocketOptionAccessorImpl.java:29)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:239)
```
We ask the user to file a bug report for a limitation we documented ourselves.
3. Out-of-range values go the other way β `setOption` rejects them with a `SocketException`, which is an `IOException`, so the driver reports a network failure *and* marks the host dead in the static `GlobalHostStatusTracker.hostStatusMap`, for every other connection in the JVM until `hostRecheckSeconds` elapses:
```
tcpKeepAliveCount=-1 -> PSQLException [The connection attempt failed.] root=java.net.SocketException: Invalid argument
tcpKeepAliveIdle=2147483647 -> PSQLException [The connection attempt failed.] root=java.net.SocketException: Invalid argument
tcpKeepAliveCount=0 -> CONNECTED (silently ignored, socket keeps the default)
```
`tcpKeepAliveCount=abc` is already handled well, by `PGProperty.getInteger`, with `INVALID_PARAMETER_VALUE` β that is the shape the rest should have.
My preference is to match libpq: apply only when `tcpKeepAlive=true`, and where the option is unsupported log a warning and carry on. That removes most of this. If you would rather fail loudly, it has to be a `PSQLException` through `GT.tr` naming the connection property, and the docs have to say so.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Two things here.
`ClassUtils.forName` is documented as loading "a class named by a connection property", and its fourth parameter as "the driver's own classloader". Neither describes this use, and `expectedClass = Object.class` defeats the `asSubclass` check the utility exists for. A plain `Class.forName(EXTENDED_SOCKET_OPTIONS_CLASS_NAME, false, ClassLoader.getPlatformClassLoader())` says what is actually happening.
The catch list misses throwables that reach the connect path as unchecked: `SecurityException` from `Class.forName`/`getField`, `NoClassDefFoundError`/`LinkageError`, and `ExceptionInInitializerError` β `ClassUtils.forName` loads with `initialize=false`, so `ExtendedSocketOptions`' static initialiser runs on the `Field.get(null)` below, and that initialiser loads the `extnet` native library.
Minor: `e.getMessage()` may be null, which silently selects the less informative message branch in `SocketOptionReference`.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConnectionTest.java)
`socketSettings` names a topic rather than a claim. Something like `aConnectionAppliesTheKeepAliveProbeSettingsToTheSocket` makes the failure line say what broke. (`pGStreamSettings` above is pre-existing and keeps its name.)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Thanks for the patience on this one, and sorry it sat for so long. I reviewed the branch at 1d9b3a8f3 and ran it against a PostgreSQL 17 container on JDK 8, 11 and 21 (macOS). The feature does work on Linux and macOS with JDK 11+: I confirmed that `tcpKeepAliveCount=80`, `tcpKeepAliveIdle=900`, `tcpKeepAliveInterval=1000` reach the socket, and that they survive the SSL upgrade. The multi-release packaging is right too β `Multi-Release: true` is on every jar and the class lands in `META-INF/versions/11`. `checkstyleMain`, `checkstyleJava11`, `autostyleJavaCheck`, `forbiddenApisMain`, `forbiddenApisJava11`, `ConnectionTest` and `PGPropertyTest` are all green, and the branch still merges cleanly with master.
What blocks it is the capability check. `isSupported()` asks whether the JDK *declares* the field, and that is not the same question as whether the socket accepts the option β which means the driver breaks on platforms it silently assumes are fine, including for users who set none of the new properties.
## Blockers
### 1. `isSupported()` reports field presence, not option support
`SocketOptionReference.isSupported()` returns `socketOption != null`, i.e. "the reflective lookup of `jdk.net.ExtendedSocketOptions.TCP_KEEPCOUNT` succeeded". The JDK creates those three constants unconditionally and gates only their *registration*:
```java
// jdk/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java
public static final SocketOption<Integer> TCP_KEEPCOUNT = new ExtSocketOption<>("TCP_KEEPCOUNT", Integer.class);
...
if (keepAliveOptSupported) {
options.addAll(Set.of(TCP_KEEPCOUNT, TCP_KEEPIDLE, TCP_KEEPINTERVAL));
}
```
`Socket.setOption`/`getOption` then throw `UnsupportedOperationException` for anything outside `supportedOptions()`. I proved the shape with `TCP_QUICKACK`, whose field resolves on macOS while the option is unsupported there:
```
field resolved reflectively: TCP_QUICKACK
supportedOptions contains TCP_QUICKACK = false
get THREW java.lang.UnsupportedOperationException: 'TCP_QUICKACK' not supported
set THREW java.lang.UnsupportedOperationException: 'TCP_QUICKACK' not supported
```
Two populations hit exactly this:
* **Windows on JDK 11β21.** Keep-alive extended socket options arrived on Windows only in JDK 22 β `jdk-21+35:src/jdk.net/windows/classes/jdk/net/WindowsSocketOptions.java` implements `IP_DONTFRAGMENT` and nothing else; `keepAliveOptionsSupported0()` was added by `f3ade388dac` ("8308593: Add Keepalive Extended Socket Options Support for Windows"), first released in `jdk-22+8`. So on windows-latest with JDK 11, 17 or 21 all three `is*Supported()` methods return `true` and every `setOption` throws.
* **Any `socketFactory` whose `Socket` is backed by a custom `SocketImpl`** β junixsocket for Unix-domain sockets, tunnelling factories. This is platform-independent; `java.net.SocketImpl`'s default `supportedOptions()` is empty:
```
supportedOptions=[]
get TCP_KEEPCOUNT THREW java.lang.UnsupportedOperationException: 'TCP_KEEPCOUNT' not supported
```
The check has to be `socket.supportedOptions().contains(option)`, which means the predicate needs the socket: `isTcpKeepCountSupported(Socket)`.
### 2. The `PGStream(PGStream, int)` copy constructor now breaks for users who set none of these properties
```java
keepCount = ExtendedSocketOptionAccessorImpl.INSTANCE.getTcpKeepCount(pgStream.getSocket());
keepIdle = ExtendedSocketOptionAccessorImpl.INSTANCE.getTcpKeepIdle(pgStream.getSocket());
keepInterval = ExtendedSocketOptionAccessorImpl.INSTANCE.getTcpKeepInterval(pgStream.getSocket());
```
These reads are unconditional, and they sit inside `try { ... } catch (SocketException ex)`. `UnsupportedOperationException` is not a `SocketException`, so on either population above it escapes the constructor. That constructor is the SSL fallback (`enableSSL`, server answers `'E'` to `SSLRequest`) and the `gssEncMode=prefer` fallback β paths a user reaches without ever having heard of `tcpKeepAliveIdle`. Note the getters also return the *system* default rather than null when the user set nothing, so the setters below always fire as well.
Please also move the reads behind a "did the user actually configure anything" check rather than reading and re-applying OS defaults on every stream rebuild.
(I checked the leak question: `tryConnect`'s `catch (Exception e) { closeStream(newStream, e); throw e; }` does close the old stream, since `newStream` is not reassigned when `enableSSL` throws. No leak.)
### 3. Error model: a configuration problem is reported as a driver bug or as a network failure
**JDK 8, any of the three set** β measured against a live server with the built jar:
```
FAILED with org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.
caused by java.lang.UnsupportedOperationException: Tuning TCP_KEEPCOUNT is only supported from JDK 11 onwards
at org.postgresql.core.ExtendedSocketOptionAccessorImpl.setTcpKeepCount(ExtendedSocketOptionAccessorImpl.java:29)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:239)
```
SQLState `99999`. We ask the user to file a bug report for a limitation we documented ourselves. Same outcome on a runtime without the `jdk.net` module (`--limit-modules`), and the same would happen on Windows/JDK 11β21. `openConnectionImpl` catches only `ConnectException`, `IOException` and `SQLException`, so the unchecked exception goes straight to `Driver.connect`'s catch-all.
**Out-of-range values** take the opposite wrong turn β `Socket.setOption` rejects them with a `SocketException`, which is an `IOException`, so the driver reports a network failure and marks the host dead:
```
tcpKeepAliveCount=-1 -> PSQLException [The connection attempt failed.] root=java.net.SocketException: Invalid argument
tcpKeepAliveIdle=-1 -> PSQLException [The connection attempt failed.] root=java.net.SocketException: Invalid argument
tcpKeepAliveIdle=2147483647 -> PSQLException [The connection attempt failed.] root=java.net.SocketException: Invalid argument
tcpKeepAliveCount=0 -> CONNECTED (silently ignored, socket keeps the default)
```
`GlobalHostStatusTracker.hostStatusMap` is a static map, so one misconfigured DataSource marks those hosts `ConnectFail` for every other connection in the JVM until `hostRecheckSeconds` elapses. Note `tcpKeepAliveCount=abc` is already handled correctly, by `PGProperty.getInteger`, with `INVALID_PARAMETER_VALUE` β that is the shape the rest should have.
Whatever the outcome of point 4 below, the messages themselves need `GT.tr` (see AGENTS.md) and should name the connection property the user set, not the JDK constant.
### 4. Decide the contract, and follow libpq
libpq is the reference for this exact feature and it promises two things we do not:
> This parameter is ignored for connections made via a Unix-domain socket, or if keepalives are disabled. It is only supported on systems where `TCP_KEEPCNT` or an equivalent socket option is available; on other systems, it has no effect.
`fe-connect.c` applies `setKeepalivesIdle/Interval/Count` only inside the `usekeepalives != 0` branch, after `SO_KEEPALIVE` succeeded. This PR applies all three regardless of `tcpKeepAlive` (whose default is `false`, so the default configuration is the one where the three properties are set on the socket and change nothing), and turns an unsupported platform into a failed connection instead of a no-op.
I would like us to match libpq: apply only when `tcpKeepAlive=true`, and where the option is unsupported log a warning and carry on. That removes most of point 3 and all of point 1's user-visible damage. If you would rather fail loudly, that is defensible too β but then it has to be a `PSQLException` naming the property, and the docs have to say so.
### 5. The new CI axis will fail on Windows
`-DtcpKeepAliveCount=9` and friends do reach the driver β `TestUtil.mergeDefaultProperties` hands `System.getProperties()` to `DriverManager.getConnection` wholesale, no allow-list. Combined with point 1, every windows-latest job with JDK 11β21 and `keep_alive=yes` fails at connect. Over 40 matrix generations that combination was 7.1% of jobs (17 of 240). The axis itself is right, and this failure is it doing its job: running the whole suite with the properties set answers "does the mere presence of the setting break anything", which is the question that matters here. Keep it, and split `yes` into `on` (just `tcpKeepAlive=true`, which works on every JDK and every OS β today a Java 8 job titled `keep_alive` sets nothing at all) and `tuned` (the three new properties). Raise `-DtcpKeepAliveInterval=1` to `10`: with `count=9` the current value gives a nine-second death window, and a nine-second stall is not exotic on a loaded runner with a containerised server doing `fsync`. Whether `tuned` needs gating depends on point 4 β if an unsupported option is ignored with a warning, it can run everywhere and the axis covers the ignore path too; if it stays fatal, `tuned` has to exclude windows-latest below JDK 22. Details in the inline comment.
## Tests
* Every new assertion is behind `if (β¦isTcpKeepCountSupported())`. On the Java 8 matrix rows the java11 classes are not on the test classpath (`pgjdbc/build.gradle.kts` prepends `java11.output` only when `testJdkVersion >= 11`), the no-op accessor returns `false`, and **all nine assertions are skipped while both tests report green**. Please use `assumeTrue(..., "reason")` so a skip is visible in the report, and gate on `supportedOptions()` rather than on `isSupported()`.
* Both tests read the expected value back through the accessor that wrote it, so the most likely real defect β a name-to-option mapping that swaps `TCP_KEEPCOUNT` and `TCP_KEEPIDLE` β survives them. The oracle should be `java.net.Socket.getOption(...)` directly. Test sources compile with `--release 8`, so that needs a small reflective helper; it works, I checked. Please also pick three values that differ from each other *and* from the platform defaults (8 / 7200 / 75).
* Nothing covers: the JDK 8 refusal (the `UnsupportedOperationException` in the java8 accessor is dead code today); an unsupported option on a JDK 11+ platform; `tcpKeepAlive=false` with the three set; negative, zero, `Integer.MAX_VALUE` and non-numeric values; `PGProperty.setInteger(props, null)` removing the key.
* Most of that needs no server. `ExtendedSocketOptionAccessorImpl` is fully observable against a loopback `ServerSocket` in one process, and `pgjdbc/src/test/java/org/postgresql/core/` already hosts server-free tests. An `ExtendedSocketOptionAccessorImplTest` there would be the right home.
* `assertEquals(80, ...)` with no message: three failures in one test print `expected: <80> but was: <8>` with nothing naming the option. Add the operand name as the message.
* `socketSettings` names a topic rather than a claim; something like `aConnectionAppliesTheKeepAliveProbeSettingsToTheSocket` says what a failure means.
## Documentation
* "Only supported from JDK 11 onwards and only when `jdk.net.ExtendedSocketOptions` is available" is not the condition the code tests, and not the condition that holds: the class itself is `@since 1.8`, the three fields are `@since 11`, and support is per platform on top of that. Say what actually decides it β Linux and macOS from JDK 11, Windows from JDK 22 β and say what happens when it does not hold.
* Nowhere do we say the three have no effect unless `tcpKeepAlive=true`. That is the single most important sentence for a reader, and it belongs on the `tcpKeepAlive` entry too.
* "The default value for this keep-alive probe retransmit limit is system dependent, but is typically 8" is copied from the JDK javadoc but reads as our claim once it is in `PGProperty`, and it is wrong on Linux, where `tcp_keepalive_probes` defaults to 9. I would drop all three "typically N" sentences: we do not set the default, and "the value the operating system applies" is the fact a user can act on.
* Please state the unit (seconds) for `tcpKeepAliveIdle` and `tcpKeepAliveInterval` in every place they are documented, including the `BaseDataSource` setters.
* `CHANGELOG.md` needs an `### Added` entry under `[Unreleased]`, the way `classLoaderStrategy`, `connectExecutor`, `flushCacheOnDdl` and `reWriteBatchedInsertsSize` have one.
## Smaller things
* `BaseDataSource.getTcpKeepAliveCount()` and its two siblings catch `PSQLException` and return `null`, so a malformed value reads back as "unset" while the connection still fails later. Every other integer getter in that class uses `getIntNoCheck` and lets the error out.
* `org.postgresql.core.ExtendedSocketOptionAccessor` is public in an exported package and is never used as a type β all call sites go through the concrete `ExtendedSocketOptionAccessorImpl.INSTANCE`, and the three `is*Supported()` methods have only test callers. Either use the interface as the declared type (the way `LazyCleanerImpl implements LazyCleaner` does in the same source set) or drop it. The two variants also disagree on `throws IOException`.
* `ClassUtils.forName(..., ClassLoaderStrategy.DRIVER, ClassLoader.getPlatformClassLoader())` is documented as loading "a class named by a connection property", and passing the platform loader as `driverClassLoader` with `expectedClass = Object.class` defeats the type check it exists for. A plain `Class.forName(name, false, ClassLoader.getPlatformClassLoader())` says what is happening.
* `createIntegerSocketOption` catches `NoSuchFieldException | ClassNotFoundException | IllegalAccessException`. `SecurityException`, `NoClassDefFoundError` and `ExceptionInInitializerError` (the `ExtendedSocketOptions` static initialiser runs on the `Field.get(null)`, and it loads the `extnet` native library) escape into the connect path.
* Class comments: the two `ExtendedSocketOptionAccessorImpl` variants carry byte-identical `Internal class, it is not a part of public API.` and neither says which JDK loads it. `LazyCleanerImpl` in the same source set is the precedent to follow. The `ExtendedSocketOptionAccessor` methods have no documentation at all, and `isTcpKeepCountSupported()` is exactly the one whose contract a reader cannot guess.
* `PGProperty.setInteger`'s javadoc is a verbatim copy of `set(Properties, String)`'s and omits the only thing that distinguishes it β a `null` value removes the key.
* `ConnectionFactoryImpl:619` (the GSS `'E'` reconnect) builds a fresh `PGStream` with the four-argument constructor, so it drops the three new options along with `keepAlive`, `tcpNoDelay` and both buffer sizes. Pre-existing for the old settings; worth a follow-up issue rather than fixing here.
* `// Enable TCP keep-alive probe if required.` in `tryConnect` now heads four statements, three of which run whatever `tcpKeepAlive` is.
* `matrix.mjs`: the new axis is indented three and four spaces where its neighbours use two, and `-DtcpKeepAliveInterval=1` is the most aggressive value the option takes β `5` costs nothing on a loaded runner.
* README table padding on the three new rows, and `use.md` writes `*integer*` where its neighbours write `*int*`.
Happy to help with any of this β the core of the change is right and the feature is worth having.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java)
The comment on line 233, `// Enable TCP keep-alive probe if required.`, now heads four statements instead of one, and three of them run whatever `tcpKeepAlive` is β so "if required" is false of the code beneath it. Every other setting in this method (`socketTimeout`, no-delay, `receiveBufferSize`) has its own comment; these three have none.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessor.java)
This interface is public in an exported package and is never used as a type β every call site goes through the concrete `ExtendedSocketOptionAccessorImpl.INSTANCE`, and the three `is*Supported()` methods have only test callers. Either make the interface the declared type, the way `LazyCleanerImpl implements LazyCleaner` does in the same `src/main/java11` source set, or drop it.
It also has no method documentation, and `isTcpKeepCountSupported()` is exactly the member whose contract a reader cannot infer from the name. The two implementations disagree on `throws IOException` as well (the java8 variant omits it).
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/PGProperty.java:919)
Three factual problems in the text that is repeated here, in the description string, in `README.md` and in `use.md`.
1. "only when `jdk.net.ExtendedSocketOptions` is available" is not the condition that decides. The class itself is `@since 1.8`; the three fields are `@since 11`; and even on JDK 11+ the option may be absent from `socket.supportedOptions()`. Please state what actually holds β Linux and macOS from JDK 11, Windows from JDK 22 β and what the driver does when it does not.
2. Nothing says these have no effect unless `tcpKeepAlive=true`. That is the most important sentence for a reader, and it belongs on the `tcpKeepAlive` entry too. libpq states it for all three of its equivalents.
3. "the default value ... is typically 8" is copied from the JDK javadoc but reads as our claim once it is here, and it is wrong on Linux, where `tcp_keepalive_probes` defaults to 9. I would drop all three "typically N" sentences: we do not set the default, and "the value the operating system applies" is the fact a user can act on.
Please also state the unit (seconds) for the idle and interval properties.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConnectionTest.java)
**The tests cannot fail where it matters.** Two separate problems.
1. On a Java 8 test run the java11 classes are not on the test classpath (`pgjdbc/build.gradle.kts` prepends `java11.output` only when `testJdkVersion >= 11`), the no-op accessor returns `false` for all three, and **all nine new assertions are skipped while both tests report green**. `java_version: '8'` is a live matrix value. Please use `assumeTrue(..., "reason")` so the report shows a skip with a reason rather than a pass β and gate on `socket.supportedOptions()` rather than on `isSupported()`, which is the predicate under discussion on the java11 implementation.
2. The expected values are read back through the same accessor that wrote them, so the most likely real defect β a name-to-option mapping that swaps `TCP_KEEPCOUNT` and `TCP_KEEPIDLE` β survives both tests. The oracle should be `java.net.Socket.getOption(...)` directly. Test sources compile with `--release 8`, so that needs a small reflective helper; I verified it compiles and works. While you are there, pick three values that differ from each other *and* from the platform defaults (8 / 7200 / 75), and give each assertion a message naming the option, since three bare `expected: <80> but was: <8>` lines do not say which one failed.
Missing cases: the JDK 8 refusal; an unsupported option on a JDK 11+ platform; `tcpKeepAlive=false` with the three set; negative, zero, `Integer.MAX_VALUE` and non-numeric values; `PGProperty.setInteger(props, null)` removing the key. Most of those need no server β `ExtendedSocketOptionAccessorImpl` is fully observable against a loopback `ServerSocket` in one process, and `pgjdbc/src/test/java/org/postgresql/core/` already hosts server-free tests, so an `ExtendedSocketOptionAccessorImplTest` there would be the right home.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on docs/content/documentation/use.md)
Same three corrections as on the `PGProperty` constants β the real support condition, the dependency on `tcpKeepAlive=true`, and dropping "typically 8" (Linux defaults to 9) β plus: this page is where the failure mode belongs, since it is the one a user reads before filing a bug.
Two small ones: write `*int*`, as the neighbouring numeric entries do, not `*integer*`; and state the unit (seconds) for idle and interval.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on .github/workflows/matrix.mjs)
Retracting what I wrote here earlier: the axis should stay. Running the whole suite with the properties set is exactly the coverage worth having β the question it answers is not "do the probes fire" but "does the mere presence of the setting break anything", and it already answered that, since the Windows failure below is the axis doing its job. Keeping it also closes a standing gap: `tcpKeepAlive` itself has never been in the matrix.
What I would change is the values.
**Split `yes` into "keep-alive on" and "keep-alive tuned".** `tcpKeepAlive=true` works on every JDK and every OS, so it should not be gated behind the JDK 11 check that line 535 applies to the whole group β today a Java 8 job titled `keep_alive` sets nothing at all. The three tuning properties are the part with a platform floor.
```js
matrix.addAxis({
name: 'keep_alive',
title: x => x.value === 'no' ? '' : 'keep_alive_' + x.value,
values: [
{value: 'no', weight: 60}, // This is the default value, prefer testing it more
{value: 'on', weight: 20},
{value: 'tuned', weight: 20},
]
});
```
and at line 535:
```js
if (v.keep_alive !== 'no') {
testJvmArgs.push('-DtcpKeepAlive=true');
}
if (v.keep_alive === 'tuned') {
testJvmArgs.push('-DtcpKeepAliveIdle=30', '-DtcpKeepAliveInterval=10', '-DtcpKeepAliveCount=9');
}
```
**On the numbers.** `tcpKeepAliveIdle=30` is a good choice β far from the 7200 default, so a wrong value is visible, and short enough that an idle pooled connection in the suite actually reaches the probing state. `tcpKeepAliveInterval=1` with `tcpKeepAliveCount=9` is the one I would raise: it gives a 9-second death window, and a 9-second stall is not exotic on a loaded runner with a containerised server doing `fsync`. `interval=10` keeps the window at 90 seconds β still two orders of magnitude below the stock `7200 + 9*75` and still proof that the values took effect, without inventing flakiness that looks like a driver bug.
**On gating `tuned`.** That depends on how the capability question above is resolved. If the driver ends up ignoring an unsupported option with a warning, as libpq does, no gating is needed and `tuned` can run everywhere β which is the better outcome, because then the axis also covers the ignore path. If setting an unsupported option stays fatal, the axis has to avoid the combinations where it is unsupported:
```js
// jdk.net keep-alive socket options: Linux and macOS from JDK 11, Windows from JDK 22
matrix.imply({keep_alive: {value: 'tuned'}}, {java_version: v => v === eaJava || v >= 11});
matrix.exclude({keep_alive: {value: 'tuned'}, os: {value: 'windows-latest'}, java_version: v => v < 22});
```
Note `v.java_version >= 11` at line 535 is NaN-false for the early-access row, so as written `-ea` never exercises the feature; `:341` shows the idiom that handles that.
Style nits while the block is being touched: the axis is indented 3 and 4 spaces where every neighbour uses 2, and it is the only axis whose values carry no comment saying which value is the default.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
Three smaller points on these messages, whichever way the contract question on `ConnectionFactoryImpl` is resolved:
- not wrapped in `GT.tr` (see AGENTS.md, *Error messages*);
- they name the JDK option `TCP_KEEPCOUNT` rather than the connection property `tcpKeepAliveCount` that the user actually set;
- "only supported from JDK 11 onwards" is not the whole condition β see the comment on the java11 variant's `isSupported()`.
Today these three lines are also dead code: the tests gate the properties off on a Java 8 run, and `matrix.mjs` sets them only for `java_version >= 11`, so nothing executes them anywhere.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java)
This swallow conflates "unset" with "not a number": a malformed value reads back as `null` while the connection still fails later, so the DataSource misreports its own configuration. Every other integer getter in this class uses `getIntNoCheck` and lets the parse error out (`getLoginTimeout`, `getConnectTimeout`, `getSocketTimeout`, ...). Please follow that, or document both meanings of `null` on `@return`.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java)
The first sentence of a doc comment is the summary, and it is what shows up in the generated summary table β so as written the row for `setTcpKeepAliveCount` never says what the method sets. Please lead with the summary and put the JDK qualifier after it. This is published API, so the comment ships as documentation.
The setter also needs the unit for the idle and interval siblings (seconds), and a word that `null` removes the property.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/PGProperty.java)
This javadoc is a verbatim copy of `set(Properties, String)`'s, so the summary table gets two identical rows and a reader cannot tell which of the three setters to call. The one fact it owes is the one the method was added for: a `null` value removes the key rather than writing `"null"`.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on README.md)
The padding on the three new rows does not line up with the table's hand-alignment. Same text corrections as on `use.md`; the README cell should stay short and leave the detail to the docs page. One clause is owed on the `tcpKeepAlive` row too, saying the three have no effect without it.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-09-09 20:20 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-09-09 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@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.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-16 06:24 "tomdcc (@tomdcc)" <noreply+tomdcc@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: tomdcc (@tomdcc) @ 2026-10-16 06:24 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui Are you still interested in getting this in? We have hit a need to set these ourselves. Alternatively I can try to address the feedback but would have to create a new PR.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-16 06:27 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-16 06:27 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Hi @tomdcc ,
Yes still interested to finish this. I'll reply by tomorrow
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 09:11 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 09:11 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessor.java)
Kept the interface and made it the declared type: `ExtendedSocketOptionAccessorImpl.INSTANCE` is now an `ExtendedSocketOptionAccessor` in both the java8 and java11 variants (76bd4f82), so no caller can reach the implementation type any more. The interface also has a job of its own: it is what makes the compiler keep the two multi-release variants in sync.
Every method is now documented. `isTcpKeep*Supported(Socket)` states its contract: the option is in the socket's `supportedOptions()`, which depends on the JDK, the operating system and the socket implementation, so it can be `false` on JDK 11+ too. The setters document `UnsupportedOperationException` and `IOException`, the getters their `null`.
With callers seeing only the interface's `throws IOException`, the java8 variant declaring narrower `throws` clauses no longer shows anywhere, so I left it.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 09:54 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 09:54 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@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.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 10:16 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 10:16 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/PGProperty.java:919)
All four are addressed in `PGProperty` (Javadoc and description), `use.md`, `README.md` and the `BaseDataSource` setters (ef313427, 47252a4b and d52b385d): the condition is now stated as Linux and macOS from JDK 11 and Windows from JDK 22, along with what the driver does otherwise (it logs a warning and connects without the option); "has no effect unless `tcpKeepAlive` is `true`" is on the three options and on `tcpKeepAlive` itself; the "typically N" sentences are gone in favour of "the operating system's value applies"; and idle and interval state seconds.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 10:23 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 10:23 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on .github/workflows/matrix.mjs)
Done in 14c7e63b, along the driver-side route. Since e3fe21d3 an option the JDK, the operating system or the socket does not support is ignored with a warning, like libpq, so the line has no gating left:
- no `java_version` check at all, so Java 8 jobs now run with `-DtcpKeepAlive=true` (and warn about the three probe options), and the early-access row is no longer skipped;
- `windows-latest` on JDK 11β21 connects with a warning instead of failing;
- `tcpKeepAliveInterval` is `10`.
With unsupported options no longer fatal, I left the axis as `yes`/`no` rather than adding the `imply`/`exclude` pair or splitting it into `on` and `tuned`.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 10:26 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 10:26 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on .github/workflows/matrix.mjs)
Done in 209b3a80: the axis is now `no` (default, weight 60), `on` and `tuned` (20 each), with your titles. `on` sets only `tcpKeepAlive=true`; `tuned` adds `tcpKeepAliveIdle=30`, `tcpKeepAliveInterval=10` and `tcpKeepAliveCount=9`. Since an unsupported option is now ignored with a warning, neither value is gated, so `tuned` also covers the ignore path on Java 8 and on Windows before JDK 22. Indentation and the default-value comment are fixed too.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 10:26 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 10:26 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on .github/workflows/matrix.mjs)
Correction: the axis is now split into `on` and `tuned` after all, in 209b3a80, see the axis thread.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 18:58 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 18:58 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConnectionTest.java)
Done in e269ec92.
1. Every keep-alive check now runs once per option (`@ParameterizedTest` over the three) behind `assumeTrue(option.isSupportedBy(socket), "the JDK or the operating system does not support <option>")`, gated on `Socket.supportedOptions()` itself, so a Java 8 run reports skips with a reason, and a platform with partial support still checks the options it has.
2. The oracle is `TcpKeepProbeOptionOracle` in `org.postgresql.test.util`, which reads and writes `jdk.net.ExtendedSocketOptions` through `Socket.getOption`/`setOption` reflectively. A new server-free `ExtendedSocketOptionAccessorImplTest` (loopback `ServerSocket`) checks the accessor against it in both directions, so a swapped mapping fails whichever side it is on.
3. Missing cases: an option the socket does not support (a `Socket` subclass reporting no supported options) is ignored with one exact `WARNING` per option, in the new `TcpKeepSettingsTest`; negative and non-numeric values are rejected with their exact message, for each of the three properties; `setInteger(props, null)` removes the key. `tcpKeepAlive=false`, zero and `Integer.MAX_VALUE` were already covered. The JDK 8 refusal no longer exists: since e3fe21d3 the options are ignored with a warning there, and the ignore test covers that path.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-17 19:07 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-17 19:07 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui requested a review.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-21 15:50 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-21 15:50 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi ready for review
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/PGStream.java)
The 4-arg constructor does not need `@Deprecated`. It means "no keep-alive tuning", which the driver still needs: `QueryExecutorBase.sendQueryCancel` and five test classes were changed only to append `TcpKeepSettings.NONE`. Deprecating it fails downstream builds that use `-Xlint:deprecation -Werror`, and the replacement it points to takes `TcpKeepSettings`, whose Javadoc says it is not public API. Please drop the deprecation, point the `@deprecated` tags of the 2- and 3-argument constructors back at it, and revert the `NONE`-only edits. Keep the 5-arg constructor as an addition.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java)
HikariCP cannot set `Integer` setters from a string when the pool is configured through `dataSourceClassName=org.postgresql.ds.PGSimpleDataSource` (`dataSource.tcpKeepAliveIdle=30`, `addDataSourceProperty("tcpKeepAliveIdle", "30")`, or Spring's `spring.datasource.hikari.data-source-class-name` with `data-source-properties.*`). `PropertyElf.setProperty` converts only `int`, `long`, `short`, `boolean`/`Boolean`, arrays and `String`. For `Integer.class` it falls through to `Class.forName("30")`, then `writeMethod.invoke(target, "30")`, which throws `IllegalArgumentException`, rethrown as `RuntimeException`, and the pool fails to start.
These would be the only `Integer`-typed bean properties in `BaseDataSource`; every other numeric property is `int`. My July comment spelled the setter `setTcpKeepAliveCount(Integer)`; that type is the problem. Please use `int` getters and setters with a value for "unset", the way `sendBufferSize` and `receiveBufferSize` use `-1`, and make the setter remove the key for it. The type is a compatibility promise once released, so it has to be settled before merge.
Please also extend the loop in `PGPropertyTest.dataSourceProperties` that already looks up the getter and setter of every `PGProperty` through `Introspector`: assert that the setter's parameter type is `String`, `int` or `boolean`, the types every pool and binder can convert from a string. That check fails on the current three setters and catches the same mistake in any future property, with no new test dependency.
(Same for `setTcpKeepAliveIdle` at :937 and `setTcpKeepAliveInterval` at :962.)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/PGStream.java:255)
The copy constructor no longer copies `SO_KEEPALIVE` from the old socket, while it still copies the buffer sizes, `soTimeout` and `tcpNoDelay`. Keep-alive now comes only from `tcpKeepSettings`, so:
- a stream built with the 4-arg constructor (`TcpKeepSettings.NONE`, `alive == null`) whose caller called `getSocket().setKeepAlive(true)` loses keep-alive on copy;
- a stream opened with `tcpKeepAlive=false` (or unset) and then switched on through `getSocket().setKeepAlive(true)` gets `false` reapplied on copy.
`ConnectionTest.pGStreamSettings` on master tests exactly the second case: `TestUtil.openDB()` without `tcpKeepAlive`, then `pgStream.getSocket().setKeepAlive(true)` and `assertTrue(newStream.getSocket().getKeepAlive())`. The PR changes the test to set the property instead. Please keep the `getKeepAlive()`/`setKeepAlive()` copy next to the other options (for streams the driver builds, it writes the value `tcpKeepSettings` already set). Restore `pGStreamSettings` as on master, and add the property-driven case as a separate test.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/TcpKeepSettings.java)
A value the operating system rejects is ignored with a WARNING, while `0` and negative values fail the connection with `INVALID_PARAMETER_VALUE`. From the user's side the boundary between the two is arbitrary, and the warning path hides the typical mistake. `tcpKeepAliveIdle=60000` (milliseconds instead of seconds) is rejected on Linux, where `TCP_KEEPIDLE` accepts 1..32767, so the connection keeps the 7200-second default the user was trying to shorten. Linux rejects `tcpKeepAliveCount=200` the same way, since `TCP_KEEPCNT` accepts at most 127. libpq does not ignore a rejected value: `setKeepalivesIdle` returns 0 after `libpq_append_conn_error(conn, "%s(%s) failed: %s", "setsockopt", ...)`, and that address fails. Only an option missing at compile time is a silent no-op. The class comment at :27β28 ("Like libpq, β¦ rejects is ignored with a warning") states the opposite.
The earlier review asked for the out-of-range case to take the shape `tcpKeepAliveCount=abc` already has. Please report an OS rejection as a `PSQLException` with `INVALID_PARAMETER_VALUE` naming the property and the value. It should not mark the host `ConnectFail` in `GlobalHostStatusTracker`: both the `IOException` and the `SQLException` catch in `openConnectionImpl` do that today, and the value is rejected the same way for every host. Keep warn-and-continue for unsupported options only, and update the docs sentence "or the operating system rejects the value, the driver logs a warning".
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/TcpKeepSettings.java)
Two problems with this warning.
- The text names "the JDK or the operating system", but the option is also missing when a `socketFactory` socket does not list it in `supportedOptions()`. `SocketWithoutExtendedOptions` models that case, and every junixsocket user hits it. Please name the socket class, `java.version` and `os.name` in the message, so a user can tell "before Java 11", "this JDK on this OS" and "this socket class" apart.
- It fires up to three times for every socket: every connection, every SSL or GSS fallback stream, every host in a multi-host URL, every pool refill. The cause does not change during the life of the JVM, so a shared configuration on Java 8 or on Windows before JDK 22 produces a steady stream of warnings nobody can act on. Please log it at WARNING once per property and cause, and at FINE after that.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
The project merges with rebase-and-merge, so all 40 commits would land on master as they are: 6 `Merge remote-tracking branch 'upstream/master' into issue-2487` commits, two `Fix styleCheck issues`, and about 20 subjects phrased as problem statements (`ExtendedSocketOptionAccessor is undocumented and bypassed through itsβ¦`). Please drop the merge commits and squash into Conventional Commits, for example:
1. `build: run source-distribution tests on Java 11+ against the META-INF/versions/11 classes` (the `reduced-pom.xml` change; it also fixes `LazyCleanerImpl`, which predates this PR).
2. `feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties` with a body that says why (with OS defaults the first probe goes out after about two hours idle), what the caller sees (the error and the warnings), and `Fixes #2487`.
3. `ci: add keep_alive axis to the test matrix` (or fold it into 2).
The PR title should follow the same format, and the PR body is stale: "If tests are needed, please give me some pointers" no longer describes the change.
Several claims are checked only in `ConnectionTest`, which needs a server, although the `PGStream` constructor only connects a socket, and a loopback `ServerSocket` (as in `ExtendedSocketOptionAccessorImplTest`) is enough:
- no server-free test covers `tcpKeepAlive=false` (or unset) with a probe option set;
- no server-free test covers `0`; `TcpKeepSettingsTest` uses only `-30`, and nothing checks that `1` is accepted;
- no server-free test covers `applyTo` being called from `createSocket`, or the copy constructor reapplying the settings;
- nothing covers the `BaseDataSource` setters: `setTcpKeepAliveIdle` writing the `tcpKeepAliveCount` key would pass every test. One parameterized set-then-get with a distinct value per property, plus a check that the "unset" value removes the key, would cover them.
With those in place, `aConnectionAppliesTheKeepAliveProbeSettingToTheSocket` is enough as the end-to-end test, and `aPGStreamCopyAppliesTheKeepAliveProbeSettingToItsSocket`, `aKeepAliveProbeSettingIsIgnoredWhenKeepAliveIsDisabled`, `keepAliveProbeOptionsThePlatformCannotApplyAreIgnored` and `nonPositiveKeepAliveProbeOptionIsRejected` can move to the server-free tests or go. As they stand:
- the first leaks the stream it opens at `ConnectionTest.java:580` (`new PGStream(pgStream, 10).getSocket()` is never closed);
- the third asserts only `con.isValid(5)`, so it shows neither a warning nor an ignored option;
- the last hardcodes the English message, which breaks under the locale axis once the msgid is translated; `TcpKeepSettingsTest` already uses `GT.tr` for it.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/TcpKeepSettings.java:118)
`applySetting` catches only `SocketException`, so an `UnsupportedOperationException` from `setOption` still escapes and turns into SQLState `99999`, the outcome the earlier review called a blocker. `supportedOptions()` is not a reliable guard. On JDK 11 GA (`jdk-11+28`), `Socket.supportedOptions()` caches the set in a `private static` field shared by every socket in the JVM (fixed by JDK-8213418 in JDK 12). So a custom-`SocketImpl` socket can report the platform options because an ordinary socket asked first, and its `setOption` then throws. Please catch `UnsupportedOperationException` next to `SocketException` and log the "not supported" warning for it.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on docs/content/documentation/use.md)
The same sentence about platform support and warnings is repeated in all three entries. Please state it once, in the `tcpKeepAlive` entry, with the literal warning and error text a user will search for. Give each of the three entries one line: what it sets, the unit, "When unset, the operating system's value applies", and "Requires `tcpKeepAlive=true`; see `tcpKeepAlive` for platform support and invalid values". The `tcpKeepAlive` entry should also say why anyone tunes these: with the operating system's defaults the first probe goes out after about two hours idle.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on CHANGELOG.md)
The entry restates the docs page in about 115 words. A changelog reader needs the properties, the condition, and the strings to search for:
```markdown
* feat: add `tcpKeepAliveCount`, `tcpKeepAliveIdle` and `tcpKeepAliveInterval` connection properties to set the TCP keep-alive probe count, idle time and interval instead of the operating system's defaults. They apply only with `tcpKeepAlive=true`, on Linux and macOS from JDK 11, AIX from JDK 21 and Windows from JDK 22; elsewhere the driver logs `Ignoring tcpKeepAliveIdle: ...` and connects without the option. A zero or negative value fails the connection with `tcpKeepAliveIdle parameter value must be a positive integer but was: 0` [Issue #2487](https://github.com/pgjdbc/pgjdbc/issues/2487) [PR #3964](https://github.com/pgjdbc/pgjdbc/pull/3964)
```
(adjusted to whatever the rejected-value and validation decisions above end up being).
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java)
"the keep-alive probe options of `jdk.net.ExtendedSocketOptions` only exist from Java 11" is false: JDK 8u272 added `TCP_KEEPIDLE`, `TCP_KEEPINTERVAL` and `TCP_KEEPCOUNT` to JDK 8's `jdk.net.ExtendedSocketOptions` (JDK-8194298 backport). There they are set through `jdk.net.Sockets.setOption(Socket, ...)`, because Java 8's `Socket` has no `setOption` or `supportedOptions()`. This variant finds nothing because it does not use `jdk.net.Sockets`; please say that, and that Java 8 support is left out by choice. The same applies to the `@return` in `ExtendedSocketOptionAccessor` ("`null` if `socket` does not accept it"), which is not why it returns `null` on Java 8.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/PGProperty.java)
Two factual problems in the text repeated here, in the description strings, in the `BaseDataSource` setters, `use.md`, `README.md` and `CHANGELOG.md`:
- The last sentence contradicts "Has no effect unless `tcpKeepAlive` is `true`": `openConnectionImpl` calls `TcpKeepSettings.read(info)` on every connection, so `tcpKeepAlive=false&tcpKeepAliveIdle=0` fails with `tcpKeepAliveIdle parameter value must be a positive integer but was: 0`. Please either say "A value that is not a positive integer fails the connection, even when `tcpKeepAlive` is `false`", or validate the three only when `tcpKeepAlive` is `true`, as libpq does (it parses `keepalives_idle` only inside the `usekeepalives` branch).
- "Only takes effect on Linux and macOS from JDK 11 and on Windows from JDK 22" omits AIX, which supports the three options from JDK 21 (`AIXSocketOptions.keepAliveOptionsSupported0()`, JDK-8305089, `jdk-21+19`). Either add AIX or drop "Only".
The description strings are also 485 to 530 characters each, ending in the same platform clause three times, and they reach users through `DriverPropertyInfo`. A short description such as "The idle time in seconds before the first keep-alive probe. Requires tcpKeepAlive=true; when unset, the operating system's value applies." would do; the Javadoc can keep the detail.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on README.md)
The earlier review asked for the README cells to stay short and leave the detail to the docs page. The three cells still carry the platform clause, and "elsewhere it is ignored with a warning" misses the rejected-value case. Something like "The idle time in seconds before the first keep-alive probe. Requires tcpKeepAlive; unset uses the operating system's value." is enough.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/TcpKeepSettings.java)
Besides the libpq sentence, the class comment is wrong in two places:
- "A `null` value leaves the system default in place": `null` means the socket is left as the `socketFactory` created it, which is not necessarily the system default.
- `alive` is `null` only in `NONE`, because `read()` takes it from the primitive `getBoolean`. Neither `NONE` ("leaves every keep-alive setting of the socket unchanged, `SO_KEEPALIVE` included") nor the public `read()` (`@throws PSQLException` when a probe option is not a positive integer) is documented.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 08:14 "vlsi (@vlsi)" <noreply+vlsi@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: vlsi (@vlsi) @ 2026-10-22 08:14 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/ExtendedSocketOptionAccessor.java)
`ExtendedSocketOptionAccessor`, `ExtendedSocketIntOption` and both `ExtendedSocketOptionAccessorImpl` variants are referenced only from `org.postgresql.core` (main, java11 and tests). Yet they are `public` in a package the OSGi bundle exports (`-exportcontents: !org.postgresql.shaded.*, org.postgresql.*`). Making them package-private keeps the interface as the declared type and keeps them out of the API surface; only `TcpKeepSettings` needs to stay public.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 10:24 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-22 10:24 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java)
Done in 76554b6c and 06cde2da. `tcpKeepAliveCount`, `tcpKeepAliveIdle` and `tcpKeepAliveInterval` now have `int` getters and setters. `-1` means unset: the getter returns it when the key is absent, and the setter removes the key when given it. `PGProperty.setInteger` is gone, since nothing uses it any more.
The `PGPropertyTest.dataSourceProperties` loop now asserts that every setter takes `String`, `int` or `boolean`. It fails on the previous `Integer` setters. It would also fail on `setAutosave(AutoSave)` and `setPreferQueryMode(PreferQueryMode)`, so the check skips those two: their setters take enums and are already released. Going by the `PropertyElf` conversions you listed, they should hit the same problem with HikariCP's `dataSourceClassName` configuration. Changing their types would have to go through deprecation, so I'd rather handle that in a separate issue than in this PR.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 10:31 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-22 10:31 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/PGStream.java:255)
Restored the `getKeepAlive()`/`setKeepAlive()` copy next to the other options, put `pGStreamSettings` back as on master, and added `aPGStreamCopyKeepsTheKeepAliveEnabledByTheConnectionProperties` for the property-driven case (d744c223).
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 11:04 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-22 11:04 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui renamed this.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 11:30 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-22 11:30 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui requested a review.
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-22 11:30 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-22 11:30 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi ready for review
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-10-26 22:31 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-10-26 22:31 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Gentle ping @vlsi :)
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-11-13 10:22 "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: reda-alaoui (@reda-alaoui) @ 2026-11-13 10:22 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@vlsi , anything I can do to reach the finish line?
^ permalink raw [nested|flat] 85+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
@ 2026-11-13 10:24 "davecramer (@davecramer)" <noreply+davecramer@github.com>
83 siblings, 0 replies; 85+ messages in thread
From: davecramer (@davecramer) @ 2026-11-13 10:24 UTC (permalink / raw)
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
@reda-alaoui nothing is being merged right now due to a security release. I do not have an ETA
^ permalink raw [nested|flat] 85+ messages in thread
end of thread, other threads:[~2026-11-13 10:24 UTC | newest]
Thread overview: 85+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-15 17:09 [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 08:38 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 08:41 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-16 08:47 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-16 08:53 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 08:59 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-16 09:04 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 09:06 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 09:10 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 09:30 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-16 09:32 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 13:53 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 14:19 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-17 14:25 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-17 17:14 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 17:23 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-17 17:38 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 18:18 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 18:51 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-03-17 19:38 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-17 19:38 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-19 08:33 ` "gitguardian[bot] (bot) (@gitguardian[bot])" <noreply+gitguardian[bot]@github.com>
2026-03-19 16:09 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-20 10:46 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-03-23 21:31 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-04-26 20:02 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-07-24 07:49 ` "fwiesweg (@fwiesweg)" <noreply+fwiesweg@github.com>
2026-07-24 11:17 ` Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-07-26 08:44 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-07-26 08:44 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-08-01 07:57 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-08-03 09:34 ` "codecov[bot] (bot) (@codecov[bot])" <noreply+codecov[bot]@github.com>
2026-08-03 09:44 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-09-09 19:30 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-09-09 20:20 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-16 06:24 ` "tomdcc (@tomdcc)" <noreply+tomdcc@github.com>
2026-10-16 06:27 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 09:11 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 09:54 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 10:16 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 10:23 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 10:26 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 10:26 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 18:58 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-17 19:07 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-21 15:50 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` Re: [pgjdbc/pgjdbc] PR #3964 (changes requested): feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 08:14 ` "vlsi (@vlsi)" <noreply+vlsi@github.com>
2026-10-22 10:24 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-22 10:31 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-22 11:04 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-22 11:30 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-22 11:30 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-10-26 22:31 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-11-13 10:22 ` "reda-alaoui (@reda-alaoui)" <noreply+reda-alaoui@github.com>
2026-11-13 10:24 ` "davecramer (@davecramer)" <noreply+davecramer@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