pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3973: fix: retry with SSL on IOException when sslMode=ALLOW
Date: Tue, 17 Mar 2026 17:44:10 +0000
Message-ID: <[email protected]> (raw)

When `sslMode=ALLOW`, the driver tries plaintext first and upgrades to SSL if the server rejects the connection. On Windows, PostgreSQL may reset the connection (`IOException`) instead of sending a FATAL auth error (`SQLException` with `INVALID_AUTHORIZATION_SPECIFICATION`). This caused the `ALLOW` flow to fail instead of upgrading to SSL.

Extract `tryConnectWithSsl` helper (mirrors `tryConnectWithoutSsl`) and handle `IOException` for `ALLOW` in the same catch block as `PREFER`.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3973: fix: retry with SSL on IOException when sslMode=ALLOW
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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