BUG #14269: Postgres JDBC driver should be able to connect using protocol version 2 to server versions 9.5+

From: kh2(at)araxis(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14269: Postgres JDBC driver should be able to connect using protocol version 2 to server versions 9.5+
Date: 2016-07-29 13:34:00
Message-ID: 20160729133400.1431.97143@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14269
Logged by: kh
Email address: kh2(at)araxis(dot)com
PostgreSQL version: 9.5.3
Operating system: FreeBSD 10.3-RELEASE-p6
Description:

With the release of PostgreSQL 9.5.0, support for the server configuration
parameter "autocommit" has been removed (as detailed in the release notes
for 9.5.0). Removal of this support prevents connections with the all recent
versions of the Postgresql JDBC driver using JDBC protocol version 2.

Attempting to use protocol version 2 to connect to Postgres servers v9.5 and
later, results in an postgresql server log entry:

ERROR: unrecognized configuration parameter "autocommit"
STATEMENT: begin; set autocommit = on; set client_encoding = 'UTF8'; SET
extra_float_digits=3; commit

The source of the error is the runInitialQueries() method of
org.postgresql.core.v2.ConnectionFactoryImpl.java where, on line 431 (taken
from version 1209 of the postgreaql JDBC driver source), any connection to a
server version 7.3 or higher runs the SQL given in the statement above.

Clearly, if the JDBC driver is to continue to support protocol version 2, it
should not be trying to set server configuration parameters that do not
exist on the server 9.5 and later, causing a connection to fail.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-07-29 14:00:32 Re: BUG #14269: Postgres JDBC driver should be able to connect using protocol version 2 to server versions 9.5+
Previous Message Bruce Momjian 2016-07-29 03:25:57 Re: BUG #14239: Array of array type reporting