Skip to content

Commit 00b82f1

Browse files
wadlejitendraarmru
andauthored
ci: remove PostgreSQL 10 from supported versions (cloudnative-pg#1009)
Starting with next minor version 1.19, CloudNativePG will stop supporting PostgreSQL 10, which reached EOL in November 11 2022. Signed-off-by: Jitendra Wadle <jitendra.wadle@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
1 parent 3f6b3de commit 00b82f1

13 files changed

+7
-49
lines changed

.github/pg_versions.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,5 @@
1818
"11": [
1919
"11.18",
2020
"11.17"
21-
],
22-
"10": [
23-
"10.23",
24-
"10.22"
2521
]
2622
}

.github/postgres-versions-update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from packaging import version
2222
from subprocess import check_output
2323

24-
min_supported_major = 10
24+
min_supported_major = 11
2525

2626
pg_repo_name = "cloudnative-pg/postgresql"
2727
pg_version_re = re.compile(r"^(\d+)(?:\.\d+|beta\d+|rc\d+|alpha\d+)(-\d+)?$")

docs/src/database_import.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ As a result, the instructions in this section are suitable for both:
1717
- importing one or more databases from an existing PostgreSQL instance, even
1818
outside Kubernetes
1919
- importing the database from any PostgreSQL version to one that is either the
20-
same or newer, enabling *major upgrades* of PostgreSQL (e.g. from version 10.x
21-
to version 14.x)
20+
same or newer, enabling *major upgrades* of PostgreSQL (e.g. from version 11.x
21+
to version 15.x)
2222

2323
!!! Warning
2424
When performing major upgrades of PostgreSQL you are responsible for making

docs/src/e2e.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The following PostgreSQL versions are tested:
1919
* PostgreSQL 13
2020
* PostgreSQL 12
2121
* PostgreSQL 11
22-
* PostgreSQL 10
2322

2423
For each tested version of Kubernetes and PostgreSQL, a Kubernetes
2524
cluster is created using [kind](https://kind.sigs.k8s.io/),

docs/src/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Here is a short description of all the available fields:
471471
- `primary`: whether to run the query only on the primary instance <!-- wokeignore:rule=master -->
472472
- `master`: same as `primary` (for compatibility with the Prometheus PostgreSQL exporter's syntax - deprecated) <!-- wokeignore:rule=master -->
473473
- `runonserver`: a semantic version range to limit the versions of PostgreSQL the query should run on
474-
(e.g. `">=10.0.0"` or `">=12.0.0 <=15.0.0"`)
474+
(e.g. `">=11.0.0"` or `">=12.0.0 <=15.0.0"`)
475475
- `target_databases`: a list of databases to run the `query` against,
476476
or a [shell-like pattern](#example-of-a-user-defined-metric-running-on-multiple-databases)
477477
to enable auto discovery. Overwrites the default database if provided.

docs/src/replication.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ CREATE USER streaming_replica WITH REPLICATION;
5959
-- NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOBYPASSRLS
6060
```
6161

62-
!!! Note
63-
Due to a `pg_rewind` requirement, in PostgreSQL 10 the `streaming_replica`
64-
user is created with `SUPERUSER` privileges.
6562

6663
Out of the box, the operator automatically sets up streaming replication within
6764
the cluster over an encrypted channel and enforces TLS client certificate

internal/management/controller/instance_controller.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,10 @@ func (r *InstanceReconciler) Reconcile(
238238
}
239239

240240
func (r *InstanceReconciler) configureSlotReplicator(cluster *apiv1.Cluster) {
241-
// If PostgreSQL is older than 11 never start the SlotReplicator
242-
psqlVersion, err := cluster.GetPostgresqlVersion()
243-
if err != nil || psqlVersion < 110000 {
241+
switch r.instance.PodName {
242+
case cluster.Status.CurrentPrimary, cluster.Status.TargetPrimary:
244243
r.instance.ConfigureSlotReplicator(nil)
245-
}
246-
247-
if cluster.Status.CurrentPrimary == r.instance.PodName || cluster.Status.TargetPrimary == r.instance.PodName {
248-
r.instance.ConfigureSlotReplicator(nil)
249-
} else {
244+
default:
250245
r.instance.ConfigureSlotReplicator(cluster.Spec.ReplicationSlots)
251246
}
252247
}

tests/e2e/asserts_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,12 +2480,6 @@ func AssertReplicationSlotsOnPod(
24802480
clusterName string,
24812481
pod corev1.Pod,
24822482
) {
2483-
// Replication slot high availability requires PostgreSQL 11 or above
2484-
if env.PostgresVersion == 10 {
2485-
Skip("Ignoring replication slots verification for postgres 10")
2486-
return
2487-
}
2488-
24892483
expectedSlots, err := testsUtils.GetExpectedReplicationSlotsOnPod(namespace, clusterName, pod.GetName(), env)
24902484
Expect(err).ToNot(HaveOccurred())
24912485

@@ -2525,11 +2519,6 @@ func AssertClusterReplicationSlotsAligned(
25252519
namespace,
25262520
clusterName string,
25272521
) {
2528-
// Replication slot high availability requires PostgreSQL 11 or above
2529-
if env.PostgresVersion == 10 {
2530-
Skip("Ignoring replication slots verification for postgres 10")
2531-
}
2532-
25332522
podList, err := env.GetClusterPodList(namespace, clusterName)
25342523
Expect(err).ToNot(HaveOccurred())
25352524
Eventually(func() bool {

tests/e2e/fastfailover_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ var _ = Describe("Fast failover", Serial, Label(tests.LabelPerformance, tests.La
109109
// forcing a failover and measuring how much time passes between the
110110
// last row written on timeline 1 and the first one on timeline 2.
111111
It("can do a fast failover", func() {
112-
if env.PostgresVersion == 10 {
113-
Skip("replication slots not available in PostgreSQL 10 or older")
114-
}
115112
namespace = "primary-failover-time"
116113
clusterName = "cluster-fast-failover"
117114
// Create a cluster in a namespace we'll delete after the test

tests/e2e/fastswitchover_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ var _ = Describe("Fast switchover", Serial, Label(tests.LabelPerformance, tests.
7878
})
7979
Context("with HA Replication Slots", func() {
8080
It("can do a fast switchover", func() {
81-
if env.PostgresVersion == 10 {
82-
Skip("replication slots are not available for PostgreSQL 10 or older")
83-
}
84-
8581
// Create a cluster in a namespace we'll delete after the test
8682
err := env.CreateNamespace(namespace)
8783
Expect(err).ToNot(HaveOccurred())

tests/e2e/replication_slot_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ var _ = Describe("Replication Slot", Label(tests.LabelReplication), func() {
3939
if testLevelEnv.Depth < int(level) {
4040
Skip("Test depth is lower than the amount requested for this test")
4141
}
42-
if env.PostgresVersion == 10 {
43-
Skip("Test will be skipped for PostgreSQL 10, replication slot " +
44-
"high availability requires PostgreSQL 11 or above")
45-
}
4642
})
4743

4844
It("Can enable and disable replication slots", func() {

tests/e2e/scaling_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ var _ = Describe("Cluster scale up and down", Serial, Label(tests.LabelReplicati
4242

4343
Context("with HA Replication Slots", func() {
4444
It("can scale the cluster size", func() {
45-
if env.PostgresVersion == 10 {
46-
Skip("replication slots are not available for PostgreSQL 10 or older")
47-
}
48-
4945
// Create a cluster in a namespace we'll delete after the test
5046
err := env.CreateNamespace(namespace)
5147
Expect(err).ToNot(HaveOccurred())

tests/e2e/switchover_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ var _ = Describe("Switchover", Serial, Label(tests.LabelSelfHealing), func() {
3939
})
4040
Context("with HA Replication slots", func() {
4141
It("reacts to switchover requests", func() {
42-
if env.PostgresVersion == 10 {
43-
Skip("replication slots not available for PostgreSQL 10 or older")
44-
}
4542
// Create a cluster in a namespace we'll delete after the test
4643
err := env.CreateNamespace(namespace)
4744
Expect(err).ToNot(HaveOccurred())

0 commit comments

Comments
 (0)