From: ump45nose (@ump45nose) <noreply+ump45nose@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: [pgjdbc/pgjdbc] PR #4526: docs: describe the socketTimeout limit on sslResponseTimeout and gssResponseTimeout
Date: Sun, 08 Nov 2026 20:11:36 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4526@github.com> (raw)
Fixes #4518
### All Submissions:
* [x] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?
### Changes to Existing Features:
* [x] Does this break existing behaviour? If so please explain.
No. This changes documentation only.
* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your core changes, as applicable?
Not applicable: no code changes.
* [ ] Have you successfully run tests with your changes locally?
Not applicable: no code changes. I ran `git diff --check` only; I did not build the docs site.
### What this changes
The `sslResponseTimeout` and `gssResponseTimeout` entries in `docs/content/documentation/use.md` said that `connectTimeout` limits the wait when it is shorter. In `ConnectionFactoryImpl.enableSSL` and `enableGSSEncrypted`, the wait is limited by `pgStream.getNetworkTimeout()`, the socket's current read timeout. Before the SSLRequest or GSSENCRequest, `tryConnect` sets that timeout only from `socketTimeout`, and only when `socketTimeout` is positive. `connectTimeout` does not affect it.
Both entries now say that `socketTimeout` (in seconds) is used instead when it is set and is shorter. The issue leaves open whether the code should change instead; this PR takes the docs route and does not change behaviour. If you prefer the code to follow the old docs, I am happy to close this.
### AI assistance
This change was prepared with assistance from an AI coding agent. I checked the new wording against `enableSSL`, `enableGSSEncrypted`, and `tryConnect` on current `master` before opening this pull request.
inline patch 1: docs/content/documentation/use.md (+2/-2 lines) download inline-1.patchdiff --git a/docs/content/documentation/use.md b/docs/content/documentation/use.mdindex dd4d097d82..2c1f06ac83 100644--- a/docs/content/documentation/use.md+++ b/docs/content/documentation/use.md@@ -205,7 +205,7 @@ Class name of the SSL password provider.
If provided will be used by ConsoleCallbackHandler
* **`sslResponseTimeout (`*Integer*`)`** *Default `5000`*\
-Time in milliseconds to wait for a response after requesting an SSL encrypted connection from the server. If this is greater than the current connectTimeout then connectTimeout will be used.+Time in milliseconds to wait for a response after requesting an SSL encrypted connection from the server. If `socketTimeout` (in seconds) is set and is shorter, `socketTimeout` is used instead.
* **`protocolVersion (`*int*`)`** *Default `null`*\
The driver supports the V3 frontend/backend protocols. The V3 protocol was introduced in 7.4 and the driver will by default try to connect using the V3 protocol.
@@ -390,7 +390,7 @@ Otherwise Kerberos/GSSAPI via JSSE is used.
| ≥ 42.7.1 | ≥ 1.0.0 |
* **`gssResponseTimeout (`*Integer*`)`** *Default `5000`*\
-Time in milliseconds to wait for a response after requesting a GSS encrypted connection from the server. If this is greater than the current connectTimeout then connectTimeout will be used.+Time in milliseconds to wait for a response after requesting a GSS encrypted connection from the server. If `socketTimeout` (in seconds) is set and is shorter, `socketTimeout` is used instead.
Since: 9.4
* **`sspiServiceClass (`*String*`)`** *Default `POSTGRES`*\