Subject: [pgjdbc/pgjdbc] PR #3678: fix: unable to open replication connection to servers < 12

From: "vlsi (@vlsi)" <[email-masked]>
Date: Mon, 16 Jun 2025 07:29:25 +0000

pgjdbc attempted issuing SET extra_float_digits for servers of versions less than 12, while the replication protocol does not allow set ... commands.

It resulted in the following [connection failure](https://github.com/pgjdbc/pgjdbc/actions/runs/15672177908/job/44145122287?pr=3668#step:8:991):

    org.postgresql.util.PSQLException: ERROR: syntax error
        at app//org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2736)
        at app//org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2421)
        at app//org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)
        at app//org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:330)
        at app//org.postgresql.core.SetupQueryRunner.run(SetupQueryRunner.java:57)
        at app//org.postgresql.core.v3.ConnectionFactoryImpl.runInitialQueries(ConnectionFactoryImpl.java:1031)
        at app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:358)
        at app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57)
        at app//org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:277)
        at app//org.postgresql.Driver.makeConnection(Driver.java:448)
        at app//org.postgresql.Driver.connect(Driver.java:298)
        at platform/[email-masked]/java.sql.DriverManager.getConnection(DriverManager.java:683)
        at platform/[email-masked]/java.sql.DriverManager.getConnection(DriverManager.java:191)
        at app//org.postgresql.test.TestUtil.openDB(TestUtil.java:356)
        at app//org.postgresql.test.TestUtil.openReplicationConnection(TestUtil.java:338)
        at app//org.postgresql.replication.CopyBothResponseTest.setUp(CopyBothResponseTest.java:60)

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Mon, 16 Jun 2025 09:27:10 +0000

interesting, I wonder how long that has been there.