Showing posts with label java8. Show all posts
Showing posts with label java8. Show all posts

Tuesday, August 1, 2017

PostgreSQL JDBC 4.1.4 driver released

The PostgreSQL JDBC team is pleased to announce the release of version 4.1.4.

Below are changes included since 42.1.1

Version 42.1.4 (2017-08-01)

Notable changes

  • Statements with non-zero fetchSize no longer require server-side named handle. This might cause issues when using old PostgreSQL versions (pre-8.4)+fetchSize+interleaved ResultSet processing combo. see issue 869

Version 42.1.3 (2017-07-14)

Notable changes
  • fixed NPE in PreparedStatement.executeBatch in case of empty batch (regression since 42.1.2) PR#867

Version 42.1.2 (2017-07-12)

Notable changes
  • Better logic for returning keyword detection. Previously, pgjdbc could be defeated by column names that contain returning, so pgjdbc failed to "return generated keys" as it considered statement as already having returning keyword PR#824 201daf1d
  • Replication API: fix issue #834 setting statusIntervalUpdate causes high CPU load PR#83559236b74
  • perf: use server-prepared statements for batch inserts when prepareThreshold>0. Note: this enables batch to use server-prepared from the first executeBatch() execution (previously it waited for prepareThreshold executeBatch() calls) abc3d9d7

Friday, April 7, 2017

Implementing SCRAM in the JDBC driver

PostgreSQL 10.0 has a fancy new authentication mechanism; Salted Challenge Response Authentication Method or SCRAM for short.

SCRAM will be an alternative to the somewhat controversial MD5 passwords currently being used by PostgreSQL, Michael Paquier has more to say on that here

This post isn't so much about SCRAM but the implementation of it in the JDBC driver. Last year in Ottawa at pgcon Alvaro from 8kdata stepped up and volunteered to write the Java implementation for the driver.

We've decided to enable this in Java 8+ versions of the driver only for a number of reasons the most important being that the cryptographic libraries required to implement this are only available in the JDK from version 8 and up.

Also factoring into the decision is the fact that SCRAM is only available in PostgreSQL 10.0+ and we are of the opinion that there will be very few people that will upgrade or use PostgreSQL 10.x without upgrading their JDK as well.