Compatibility

Pick a driver version that matches the Java runtime your application runs on and the PostgreSQL server it connects to.

For most users, install from the Current row of the table below. Consult the other rows only if you are pinned to an older Java or PostgreSQL version, or are reproducing an old environment:

  • Avoid Superseded and EOL ranges unless you have a concrete reason. Start with a row whose Status is Current or Security until YYYY-MM.
  • The .jre6 and .jre7 classifier builds are archival compatibility artifacts for Java 6 / 7; do not pick them for new deployments.
Release lineVersion rangeReleasedJavaPostgreSQLStatusNotes
42.7.x42.7.5-42.7.112026-04-288+9.1+CurrentCI: Java 8, 11, 17, 21, 25, 26-ea; PostgreSQL 9.1–17.
42.7.x42.7.0-42.7.42024-08-228+8.4+Superseded by
42.7.5+
CI: Java 8, 11, 17, 21, 22-ea; PostgreSQL 9.1–17.
42.6.x42.6.0-42.6.22024-03-138+8.4+Security until
2028-11
CI: Java 8, 11, 17; PostgreSQL 8.4–14.
42.5.x42.5.0-42.5.62024-03-138+8.4+Security until
2028-03
CI: Java 8, 11, 17; PostgreSQL 8.4–14.
42.4.x42.4.0-42.4.42024-02-208+8.4+Security until
2027-08
CI: Java 8, 11, 17; PostgreSQL 8.4–14.
42.3.x42.3.0-42.3.102024-03-138+8.4+Security until
2027-06
CI: Java 8, 11, 15; PostgreSQL 8.4–13.
42.2.x42.2.0-42.2.292024-03-138+8.4+Security until
2026-10
CI: Java 8, 11, 12, 14; PostgreSQL 8.4–13-head.
42.2.x42.2.29.jre72024-03-137+8.4+Security until
2026-10
CI: Java 7, 8, 11, 12, 14; PostgreSQL 8.4–13-head.
42.2.x42.2.27.jre62022-11-236+8.4+Security until
2026-10
CI: Java 6, 8, 11, 12, 14; PostgreSQL 8.4–13-head.
  • Version range is the closed interval of patch versions sharing the same Java / PostgreSQL floor; a new row opens every time a patch raises one of those minimums. The Released date is the commit date of the last release in that range.
  • Java and PostgreSQL show the lowest supported version with a trailing +: 9.1+ means “9.1 or newer”. Releases past a breakpoint intentionally drop support for older servers, not just CI coverage.
  • Status is anchored to the next minor line’s .0 commit date plus a five-year window: a line keeps receiving proactive backports for five years past the moment its successor ships, not five years past its own .0:
    • Current: the latest segment of the latest release line. No successor yet, so no end date attached; this is the row to choose for a new project.
    • Superseded by X.Y+: an earlier segment of an active line where a later patch raised the Java or PostgreSQL floor; new installs should pick the indicated successor.
    • Security until YYYY-MM: inside the support window; receives security backports proactively.
    • EOL since YYYY-MM: past the support window. Backports are still possible on request (see SECURITY.md ), but they no longer ship automatically.
  • Notes carries the active CI matrix on the Current row. Other rows leave it blank: the surrounding columns already convey the relevant facts (the Java cell on a .jre6 row says 6+, the version range identifies the build).
  • The .jre6 / .jre7 rows are Maven classifiers of the 42.2.x line, frozen at the last release that ran on Java 6 and Java 7 respectively. Every other row uses the unclassified artifact.

Include in any bug report:

  • pgJDBC version (e.g., 42.7.11, or 42.2.29.jre7);
  • Java version (java -version);
  • PostgreSQL server version (SELECT version()).

The first two are part of the version string the driver writes to its log; the third comes from the server. Together they place your report on a row of the table above. See CONTRIBUTING.md for the full report template.

  • Quick start : Maven / Gradle dependency for the version you picked here.
  • Server preparation : TCP listener, pg_hba.conf, and database encoding checks before the first connection.
  • Connection properties : every tunable, with the introducedIn badge showing which release added it.