Project

General

Profile

Actions

Question #4163

closed

Shall we use Postgresql JDBC driver version matching Postgres version ?

Added by François ARMAND about 11 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
2
Category:
Architecture - Dependencies
Regression:

Description

Today (Rudder 2.8), we use the postgresql "8.4-702.jdbc4" driver version. I'm seing that there exists both jdbc4/jdbc3 version of the driver, and 8.1, 8.2, 8.3, 8.4, 9.0, 9.1... etc version of the driver.

For the JDBC part, it's easy: we need JDBC4.

But do we must ensure that the PostgreSQL driver matches the PostgreSQL DB version ? Or can we simply use the most recent driver, and assume it will work on (not too old) past Postgres version ? Or contrary, do we need to use the driver corresponding to the oldest Postgresql version we support?

Actions #1

Updated by Nicolas CHARLES about 11 years ago

  • Description updated (diff)

According to http://jdbc.postgresql.org/download.html , the version we should be using is 9.3-1100 JDBC4 (as we are supporting Java 1.6)

and stackoverflow confirms that
http://stackoverflow.com/questions/18392170/does-a-jdbc-drivers-version-and-a-dbs-version-have-to-match-exactly

Actions #2

Updated by François ARMAND about 11 years ago

  • Status changed from Discussion to Resolved

Cool, thanks!

Actions #3

Updated by Jonathan CLARKE about 11 years ago

  • Status changed from Resolved to Discussion
  • Assignee changed from Nicolas CHARLES to François ARMAND

François ARMAND wrote:

Today (Rudder 2.8), we use the postgresql "8.4-702.jdbc4" driver version. I'm seing that there exists both jdbc4/jdbc3 version of the driver, and 8.1, 8.2, 8.3, 8.4, 9.0, 9.1... etc version of the driver.

For the JDBC part, it's easy: we need JDBC4.

But do we must ensure that the PostgreSQL driver matches the PostgreSQL DB version ? Or can we simply use the most recent driver, and assume it will work on (not too old) past Postgres version ? Or contrary, do we need to use the driver corresponding to the oldest Postgresql version we support?

It is impossible to know which version of PostgreSQL will be used on any given server. Our packages simply depend on "postrgesql", and according to the target OS and it's versions, and also the available repos (eg EPEL on CentOS/Red Hat), any version from 8.x to 9.x may be installed.

However, using the latest version because it supports the older ones as well seems perfect - great stuff! Where is this being fixed?

Actions #4

Updated by François ARMAND almost 10 years ago

  • Status changed from Discussion to Resolved

For currently supported version and upward, we now use the latest available version of the drivers.

Actions

Also available in: Atom PDF