Skip to content

Commit fc60537

Browse files
authored
Deprecate all PostgreSQL versions older than 9.1 (#3335)
The testing infrastructure no longer supports PostgreSQL versions older than 9.1. As a result, these older versions are deprecated. In upcoming releases of the driver, related code will be cleaned up and removed. The assumeMinServerVersion is set by default to 9.1 and a warning is raised for versions older than 9.1. Signed-off-by: Jorge Solórzano <jorsol@gmail.com>
1 parent c4b27cb commit fc60537

File tree

10 files changed

+25
-24
lines changed

10 files changed

+25
-24
lines changed

.github/workflows/matrix.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ matrix.addAxis({
5555
title: x => 'PG ' + x,
5656
// Strings allow versions like 18-ea
5757
values: [
58-
'8.4',
59-
'9.0',
6058
'9.1',
6159
'9.2',
6260
'9.3',
@@ -70,7 +68,7 @@ matrix.addAxis({
7068
'14',
7169
'15',
7270
'16',
73-
'17beta1'
71+
'17beta2'
7472
]
7573
});
7674

@@ -159,7 +157,7 @@ matrix.addAxis({
159157
title: x => (x.value === 'yes' ? '' : 'no_') + 'scram',
160158
values: [
161159
{value: 'yes', weight: 10},
162-
{value: 'no', weight: 10},
160+
{value: 'no', weight: 5},
163161
]
164162
});
165163

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The purpose of the *Guidelines for Contributing* is to create a collaboration ba
66
**Do NOT** blindly obey these guidelines, use them (after understanding) where they make sense.
77

88
Currently the PgJDBC driver supports the Oracle and OpenJDK Java implementations of
9-
versions **8** and **higher**; and PostgreSQL server versions from **8.4** and higher.
9+
versions **8** and **higher**; and PostgreSQL server versions from **9.1** and higher.
1010

1111
Some PostgreSQL forks *might* work but are not officially supported, we support vendors of forks
1212
that want to improve this driver by sending us pull requests that are not disruptive to the

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The current version of the driver should be compatible with **PostgreSQL 8.4 and
1919

2020
PgJDBC regression tests are run against all PostgreSQL versions since 9.1, including "build PostgreSQL from git master" version. There are other derived forks of PostgreSQL but they have not been certified to run with PgJDBC. If you find a bug or regression on supported versions, please file an [Issue](https://github.com/pgjdbc/pgjdbc/issues).
2121

22+
> **Note:** PgJDBC versions since 42.8.0 are not guaranteed to work with PostgreSQL older than 9.1.
23+
2224
## Get the Driver
2325
Most people do not need to compile PgJDBC. You can download the precompiled driver (jar) from the [PostgreSQL JDBC site](https://jdbc.postgresql.org/download/) or using your chosen dependency management tool:
2426

TESTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If you have Docker, you can use `docker-compose` to launch test database (see [d
5353
to reproduce CI errors locally. It respects all the same environment variables
5454
used by the CI matrix:
5555

56-
PGV = "8.4" | "9.0" | ... "13" ... - PostgreSQL server version (defaults to latest)
56+
PGV = "9.2" | "9.6" | ... "13" ... - PostgreSQL server version (defaults to latest)
5757
SSL = "yes" | "no" - Whether to enable SSL
5858
XA = "yes" | "no" - Whether to enable XA for prepared transactions
5959
SCRAM = "yes" | "no" - Whether to enable SCRAM authentication
@@ -67,9 +67,9 @@ If you have Docker, you can use `docker-compose` to launch test database (see [d
6767

6868
docker/bin/postgres-server
6969

70-
To start a v8.4 server without SSL:
70+
To start a v9.2 server without SSL:
7171

72-
PGV=8.4 SSL=off docker/bin/postgres-server
72+
PGV=9.2 SSL=off docker/bin/postgres-server
7373

7474
To start a v10 server with SCRAM disabled:
7575

docker/bin/postgres-server

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -euo pipefail
77
# to reproduce CI errors locally. It respects all the same environment variables
88
# used by the CI matrix:
99
#
10-
# PGV = "8.4" | "9.0" | ... "13" ... - PostgreSQL server version (defaults to latest)
10+
# PGV = "9.2" | "9.6" | ... "13" ... - PostgreSQL server version (defaults to latest)
1111
# SSL = "yes" | "no" - Whether to enable SSL
1212
# XA = "yes" | "no" - Whether to enable XA for prepared transactions
1313
# SCRAM = "yes" | "no" - Whether to enable SCRAM authentication
@@ -21,9 +21,9 @@ set -euo pipefail
2121
#
2222
# docker/bin/postgres-server
2323
#
24-
# To start a v8.4 server without SSL:
24+
# To start a v9.2 server without SSL:
2525
#
26-
# PGV=8.4 SSL=off docker/bin/postgres-server
26+
# PGV=9.2 SSL=off docker/bin/postgres-server
2727
#
2828
# To start a v10 server with SCRAM disabled:
2929
#

docs/content/download/_index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ Binary JAR file downloads of the JDBC driver are available here and the current
88

99
## Latest Versions
1010

11-
This is the current version of the driver. Unless you have unusual requirements (running old applications or JVMs), this is the driver you should be using. It supports PostgreSQL 8.2 or newer and requires Java 6 or newer. It contains support for SSL and the javax.sql package.
11+
This is the current version of the driver. Unless you have unusual requirements (running old applications or JVMs), this is the driver you should be using. It supports PostgreSQL 8.4 or newer and requires Java 6 or newer. It contains support for SSL and the javax.sql package.
12+
13+
> **Note:**
14+
>
15+
> Testing of PostgreSQL versions is currently limited to versions 9.1 and newer. PgJDBC versions since 42.8.0 are not guaranteed to work with PostgreSQL older than 9.1.
1216
1317
{{< recent-versions >}}
1418

docs/data/versions.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ suffix=""
77
description= "If you are using Java 8 or newer then you should use the JDBC 4.2 version."
88
url= "/download/postgresql-42.7.3.jar"
99

10-
[[recent]]
11-
j_name= "Java 8"
12-
version= "42.6.2"
13-
suffix=""
14-
description= "If you are using Java 8 or newer then you should use the JDBC 4.2 version."
15-
url= "/download/postgresql-42.6.2.jar"
16-
1710
[[recent]]
1811
j_name= "Java 7"
1912
version= "42.2.29"
@@ -38,10 +31,10 @@ url= "/download/postgresql-42.7.2.jar"
3831

3932
[[past]]
4033
j_name= "Java 8"
41-
version= "42.6.1"
34+
version= "42.6.2"
4235
suffix=""
4336
description= "If you are using Java 8 or newer then you should use the JDBC 4.2 version."
44-
url= "/download/postgresql-42.6.1.jar"
37+
url= "/download/postgresql-42.6.2.jar"
4538

4639
[[past]]
4740
j_name= "Java 8"

pgjdbc/src/main/java/org/postgresql/PGProperty.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public enum PGProperty {
7979
*/
8080
ASSUME_MIN_SERVER_VERSION(
8181
"assumeMinServerVersion",
82-
null,
82+
"9.1",
8383
"Assume the server is at least that version"),
8484

8585
/**

pgjdbc/src/main/java/org/postgresql/core/ServerVersion.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
public enum ServerVersion implements Version {
1717

1818
INVALID("0.0.0"),
19+
@Deprecated
1920
v8_2("8.2.0"),
21+
@Deprecated
2022
v8_3("8.3.0"),
23+
@Deprecated
2124
v8_4("8.4.0"),
25+
@Deprecated
2226
v9_0("9.0.0"),
2327
v9_1("9.1.0"),
2428
v9_2("9.2.0"),

pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ public PgConnection(HostSpec[] hostSpecs,
272272
// Now make the initial connection and set up local state
273273
this.queryExecutor = ConnectionFactory.openConnection(hostSpecs, info);
274274

275-
// WARNING for unsupported servers (8.1 and lower are not supported)
276-
if (LOGGER.isLoggable(Level.WARNING) && !haveMinimumServerVersion(ServerVersion.v8_2)) {
275+
// WARNING for unsupported servers (9.0 and lower are not supported)
276+
if (LOGGER.isLoggable(Level.WARNING) && !haveMinimumServerVersion(ServerVersion.v9_1)) {
277277
LOGGER.log(Level.WARNING, "Unsupported Server Version: {0}", queryExecutor.getServerVersion());
278278
}
279279

0 commit comments

Comments
 (0)