Skip to content

Commit 3e148ea

Browse files
authored
enable operator support for pg15 and drop support for 9.5 and 9.6 (#2140)
* enable operator support for pg15 and drop support for 9.5 and 9.6 * not offer 15 in UI before spilo-15 is available
1 parent 81e17e4 commit 3e148ea

24 files changed

+54
-59
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2929

3030
### PostgreSQL features
3131

32-
* Supports PostgreSQL 14, starting from 9.6+
32+
* Supports PostgreSQL 14, starting from 10+
3333
* Streaming replication cluster via Patroni
3434
* Point-In-Time-Recovery with
3535
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
3636
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
3737
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
38-
[pg_stat_statements](https://www.postgresql.org/docs/14/pgstatstatements.html),
38+
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
3939
[pgextwlist](https://github.com/dimitri/pgextwlist),
4040
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
4141
* Incl. popular Postgres extensions such as

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ spec:
167167
type: string
168168
minimal_major_version:
169169
type: string
170-
default: "9.6"
170+
default: "11"
171171
target_major_version:
172172
type: string
173173
default: "14"

charts/postgres-operator/crds/postgresqls.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,12 @@ spec:
367367
version:
368368
type: string
369369
enum:
370-
- "9.5"
371-
- "9.6"
372370
- "10"
373371
- "11"
374372
- "12"
375373
- "13"
376374
- "14"
375+
- "15"
377376
parameters:
378377
type: object
379378
additionalProperties:

charts/postgres-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ configMajorVersionUpgrade:
8989
# - acid
9090

9191
# minimal Postgres major version that will not automatically be upgraded
92-
minimal_major_version: "9.6"
92+
minimal_major_version: "11"
9393
# target Postgres major version when upgrading clusters automatically
9494
target_major_version: "14"
9595

docker/logical-backup/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ RUN apt-get update \
2323
&& curl --silent https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
2424
&& apt-get update \
2525
&& apt-get install --no-install-recommends -y \
26+
postgresql-client-15 \
2627
postgresql-client-14 \
2728
postgresql-client-13 \
2829
postgresql-client-12 \
2930
postgresql-client-11 \
3031
postgresql-client-10 \
31-
postgresql-client-9.6 \
32-
postgresql-client-9.5 \
3332
&& apt-get clean \
3433
&& rm -rf /var/lib/apt/lists/*
3534

docs/administrator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ aws_or_gcp:
11111111

11121112
If cluster members have to be (re)initialized restoring physical backups
11131113
happens automatically either from the backup location or by running
1114-
[pg_basebackup](https://www.postgresql.org/docs/13/app-pgbasebackup.html)
1114+
[pg_basebackup](https://www.postgresql.org/docs/15/app-pgbasebackup.html)
11151115
on one of the other running instances (preferably replicas if they do not lag
11161116
behind). You can test restoring backups by [cloning](user.md#how-to-clone-an-existing-postgresql-cluster)
11171117
clusters.

docs/reference/cluster_manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ Those parameters are grouped under the `tls` top-level key.
558558
## Change data capture streams
559559

560560
This sections enables change data capture (CDC) streams via Postgres'
561-
[logical decoding](https://www.postgresql.org/docs/14/logicaldecoding.html)
561+
[logical decoding](https://www.postgresql.org/docs/15/logicaldecoding.html)
562562
feature and `pgoutput` plugin. While the Postgres operator takes responsibility
563563
for providing the setup to publish change events, it relies on external tools
564564
to consume them. At Zalando, we are using a workflow based on
@@ -590,7 +590,7 @@ can have the following properties:
590590
and `payloadColumn`). The CDC operator is following the [outbox pattern](https://debezium.io/blog/2019/02/19/reliable-microservices-data-exchange-with-the-outbox-pattern/).
591591
The application is responsible for putting events into a (JSON/B or VARCHAR)
592592
payload column of the outbox table in the structure of the specified target
593-
event type. The operator will create a [PUBLICATION](https://www.postgresql.org/docs/14/logical-replication-publication.html)
593+
event type. The operator will create a [PUBLICATION](https://www.postgresql.org/docs/15/logical-replication-publication.html)
594594
in Postgres for all tables specified for one `database` and `applicationId`.
595595
The CDC operator will consume from it shortly after transactions are
596596
committed to the outbox table. The `idColumn` will be used in telemetry for

docs/reference/operator_parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
246246

247247
* **minimal_major_version**
248248
The minimal Postgres major version that will not automatically be upgraded
249-
when `major_version_upgrade_mode` is set to `"full"`. The default is `"9.6"`.
249+
when `major_version_upgrade_mode` is set to `"full"`. The default is `"11"`.
250250

251251
* **target_major_version**
252252
The target Postgres major version when upgrading clusters automatically

docs/user.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ Postgres Operator will create the following NOLOGIN roles:
517517

518518
The `<dbname>_owner` role is the database owner and should be used when creating
519519
new database objects. All members of the `admin` role, e.g. teams API roles, can
520-
become the owner with the `SET ROLE` command. [Default privileges](https://www.postgresql.org/docs/12/sql-alterdefaultprivileges.html)
520+
become the owner with the `SET ROLE` command. [Default privileges](https://www.postgresql.org/docs/15/sql-alterdefaultprivileges.html)
521521
are configured for the owner role so that the `<dbname>_reader` role
522522
automatically gets read-access (SELECT) to new tables and sequences and the
523523
`<dbname>_writer` receives write-access (INSERT, UPDATE, DELETE on tables,
@@ -592,7 +592,7 @@ spec:
592592

593593
### Schema `search_path` for default roles
594594

595-
The schema [`search_path`](https://www.postgresql.org/docs/13/ddl-schemas.html#DDL-SCHEMAS-PATH)
595+
The schema [`search_path`](https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PATH)
596596
for each role will include the role name and the schemas, this role should have
597597
access to. So `foo_bar_writer` does not have to schema-qualify tables from
598598
schemas `foo_bar_writer, bar`, while `foo_writer` can look up `foo_writer` and
@@ -812,7 +812,7 @@ spec:
812812
### Clone directly
813813

814814
Another way to get a fresh copy of your source DB cluster is via
815-
[pg_basebackup](https://www.postgresql.org/docs/13/app-pgbasebackup.html). To
815+
[pg_basebackup](https://www.postgresql.org/docs/15/app-pgbasebackup.html). To
816816
use this feature simply leave out the timestamp field from the clone section.
817817
The operator will connect to the service of the source cluster by name. If the
818818
cluster is called test, then the connection string will look like host=test

manifests/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ data:
9797
# max_memory_request: 4Gi
9898
# min_cpu_limit: 250m
9999
# min_memory_limit: 250Mi
100-
# minimal_major_version: "9.6"
100+
# minimal_major_version: "11"
101101
# node_readiness_label: "status:ready"
102102
# node_readiness_label_merge: "OR"
103103
# oauth_token_secret_name: postgresql-operator

manifests/operatorconfiguration.crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ spec:
165165
type: string
166166
minimal_major_version:
167167
type: string
168-
default: "9.6"
168+
default: "11"
169169
target_major_version:
170170
type: string
171171
default: "14"

manifests/postgresql-operator-default-configuration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ configuration:
3939
major_version_upgrade_mode: "off"
4040
# major_version_upgrade_team_allow_list:
4141
# - acid
42-
minimal_major_version: "9.6"
42+
minimal_major_version: "11"
4343
target_major_version: "14"
4444
kubernetes:
4545
# additional_pod_capabilities:

manifests/postgresql.crd.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,12 @@ spec:
365365
version:
366366
type: string
367367
enum:
368-
- "9.5"
369-
- "9.6"
370368
- "10"
371369
- "11"
372370
- "12"
373371
- "13"
374372
- "14"
373+
- "15"
375374
parameters:
376375
type: object
377376
additionalProperties:

pkg/apis/acid.zalan.do/v1/crds.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,6 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
580580
"version": {
581581
Type: "string",
582582
Enum: []apiextv1.JSON{
583-
{
584-
Raw: []byte(`"9.5"`),
585-
},
586-
{
587-
Raw: []byte(`"9.6"`),
588-
},
589583
{
590584
Raw: []byte(`"10"`),
591585
},
@@ -601,6 +595,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
601595
{
602596
Raw: []byte(`"14"`),
603597
},
598+
{
599+
Raw: []byte(`"15"`),
600+
},
604601
},
605602
},
606603
"parameters": {

pkg/apis/acid.zalan.do/v1/operator_configuration_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type PostgresUsersConfiguration struct {
4949
type MajorVersionUpgradeConfiguration struct {
5050
MajorVersionUpgradeMode string `json:"major_version_upgrade_mode" default:"off"` // off - no actions, manual - manifest triggers action, full - manifest and minimal version violation trigger upgrade
5151
MajorVersionUpgradeTeamAllowList []string `json:"major_version_upgrade_team_allow_list,omitempty"`
52-
MinimalMajorVersion string `json:"minimal_major_version" default:"9.6"`
52+
MinimalMajorVersion string `json:"minimal_major_version" default:"11"`
5353
TargetMajorVersion string `json:"target_major_version" default:"14"`
5454
}
5555

pkg/apis/acid.zalan.do/v1/util_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ var unmarshalCluster = []struct {
213213
"127.0.0.1/32"
214214
],
215215
"postgresql": {
216-
"version": "9.6",
216+
"version": "15",
217217
"parameters": {
218218
"shared_buffers": "32MB",
219219
"max_connections": "10",
@@ -273,7 +273,7 @@ var unmarshalCluster = []struct {
273273
},
274274
Spec: PostgresSpec{
275275
PostgresqlParam: PostgresqlParam{
276-
PgVersion: "9.6",
276+
PgVersion: "15",
277277
Parameters: map[string]string{
278278
"shared_buffers": "32MB",
279279
"max_connections": "10",
@@ -333,7 +333,7 @@ var unmarshalCluster = []struct {
333333
},
334334
Error: "",
335335
},
336-
marshal: []byte(`{"kind":"Postgresql","apiVersion":"acid.zalan.do/v1","metadata":{"name":"acid-testcluster1","creationTimestamp":null},"spec":{"postgresql":{"version":"9.6","parameters":{"log_statement":"all","max_connections":"10","shared_buffers":"32MB"}},"pod_priority_class_name":"spilo-pod-priority","volume":{"size":"5Gi","storageClass":"SSD", "subPath": "subdir"},"enableShmVolume":false,"patroni":{"initdb":{"data-checksums":"true","encoding":"UTF8","locale":"en_US.UTF-8"},"pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"],"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}}},"resources":{"requests":{"cpu":"10m","memory":"50Mi"},"limits":{"cpu":"300m","memory":"3000Mi"}},"teamId":"acid","allowedSourceRanges":["127.0.0.1/32"],"numberOfInstances":2,"users":{"zalando":["superuser","createdb"]},"maintenanceWindows":["Mon:01:00-06:00","Sat:00:00-04:00","05:00-05:15"],"clone":{"cluster":"acid-batman"}},"status":{"PostgresClusterStatus":""}}`),
336+
marshal: []byte(`{"kind":"Postgresql","apiVersion":"acid.zalan.do/v1","metadata":{"name":"acid-testcluster1","creationTimestamp":null},"spec":{"postgresql":{"version":"15","parameters":{"log_statement":"all","max_connections":"10","shared_buffers":"32MB"}},"pod_priority_class_name":"spilo-pod-priority","volume":{"size":"5Gi","storageClass":"SSD", "subPath": "subdir"},"enableShmVolume":false,"patroni":{"initdb":{"data-checksums":"true","encoding":"UTF8","locale":"en_US.UTF-8"},"pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"],"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}}},"resources":{"requests":{"cpu":"10m","memory":"50Mi"},"limits":{"cpu":"300m","memory":"3000Mi"}},"teamId":"acid","allowedSourceRanges":["127.0.0.1/32"],"numberOfInstances":2,"users":{"zalando":["superuser","createdb"]},"maintenanceWindows":["Mon:01:00-06:00","Sat:00:00-04:00","05:00-05:15"],"clone":{"cluster":"acid-batman"}},"status":{"PostgresClusterStatus":""}}`),
337337
err: nil},
338338
{
339339
about: "example with clone",
@@ -398,7 +398,7 @@ var postgresqlList = []struct {
398398
out PostgresqlList
399399
err error
400400
}{
401-
{"expect success", []byte(`{"apiVersion":"v1","items":[{"apiVersion":"acid.zalan.do/v1","kind":"Postgresql","metadata":{"labels":{"team":"acid"},"name":"acid-testcluster42","namespace":"default","resourceVersion":"30446957","selfLink":"/apis/acid.zalan.do/v1/namespaces/default/postgresqls/acid-testcluster42","uid":"857cd208-33dc-11e7-b20a-0699041e4b03"},"spec":{"allowedSourceRanges":["185.85.220.0/22"],"numberOfInstances":1,"postgresql":{"version":"9.6"},"teamId":"acid","volume":{"size":"10Gi"}},"status":{"PostgresClusterStatus":"Running"}}],"kind":"List","metadata":{},"resourceVersion":"","selfLink":""}`),
401+
{"expect success", []byte(`{"apiVersion":"v1","items":[{"apiVersion":"acid.zalan.do/v1","kind":"Postgresql","metadata":{"labels":{"team":"acid"},"name":"acid-testcluster42","namespace":"default","resourceVersion":"30446957","selfLink":"/apis/acid.zalan.do/v1/namespaces/default/postgresqls/acid-testcluster42","uid":"857cd208-33dc-11e7-b20a-0699041e4b03"},"spec":{"allowedSourceRanges":["185.85.220.0/22"],"numberOfInstances":1,"postgresql":{"version":"15"},"teamId":"acid","volume":{"size":"10Gi"}},"status":{"PostgresClusterStatus":"Running"}}],"kind":"List","metadata":{},"resourceVersion":"","selfLink":""}`),
402402
PostgresqlList{
403403
TypeMeta: metav1.TypeMeta{
404404
Kind: "List",
@@ -419,7 +419,7 @@ var postgresqlList = []struct {
419419
},
420420
Spec: PostgresSpec{
421421
ClusterName: "testcluster42",
422-
PostgresqlParam: PostgresqlParam{PgVersion: "9.6"},
422+
PostgresqlParam: PostgresqlParam{PgVersion: "15"},
423423
Volume: Volume{Size: "10Gi"},
424424
TeamID: "acid",
425425
AllowedSourceRanges: []string{"185.85.220.0/22"},

pkg/cluster/k8sres_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
7474
}{
7575
{
7676
subtest: "Patroni default configuration",
77-
pgParam: &acidv1.PostgresqlParam{PgVersion: "9.6"},
77+
pgParam: &acidv1.PostgresqlParam{PgVersion: "15"},
7878
patroni: &acidv1.Patroni{},
7979
opConfig: &config.Config{
8080
Auth: config.Auth{
8181
PamRoleName: "zalandos",
8282
},
8383
},
84-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/9.6/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{}}}`,
84+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/15/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{}}}`,
8585
},
8686
{
8787
subtest: "Patroni configured",
88-
pgParam: &acidv1.PostgresqlParam{PgVersion: "11"},
88+
pgParam: &acidv1.PostgresqlParam{PgVersion: "15"},
8989
patroni: &acidv1.Patroni{
9090
InitDB: map[string]string{
9191
"encoding": "UTF8",
@@ -108,23 +108,23 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
108108
PamRoleName: "zalandos",
109109
},
110110
},
111-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/11/bin","pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"]},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"},"data-checksums",{"encoding":"UTF8"},{"locale":"en_US.UTF-8"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"synchronous_mode":true,"synchronous_mode_strict":true,"synchronous_node_count":1,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}},"failsafe_mode":true}}}`,
111+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/15/bin","pg_hba":["hostssl all all 0.0.0.0/0 md5","host all all 0.0.0.0/0 md5"]},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"},"data-checksums",{"encoding":"UTF8"},{"locale":"en_US.UTF-8"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"ttl":30,"loop_wait":10,"retry_timeout":10,"maximum_lag_on_failover":33554432,"synchronous_mode":true,"synchronous_mode_strict":true,"synchronous_node_count":1,"slots":{"permanent_logical_1":{"database":"foo","plugin":"pgoutput","type":"logical"}},"failsafe_mode":true}}}`,
112112
},
113113
{
114114
subtest: "Patroni failsafe_mode configured globally",
115-
pgParam: &acidv1.PostgresqlParam{PgVersion: "14"},
115+
pgParam: &acidv1.PostgresqlParam{PgVersion: "15"},
116116
patroni: &acidv1.Patroni{},
117117
opConfig: &config.Config{
118118
Auth: config.Auth{
119119
PamRoleName: "zalandos",
120120
},
121121
EnablePatroniFailsafeMode: util.True(),
122122
},
123-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/14/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":true}}}`,
123+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/15/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":true}}}`,
124124
},
125125
{
126126
subtest: "Patroni failsafe_mode configured globally, disabled for cluster",
127-
pgParam: &acidv1.PostgresqlParam{PgVersion: "14"},
127+
pgParam: &acidv1.PostgresqlParam{PgVersion: "15"},
128128
patroni: &acidv1.Patroni{
129129
FailsafeMode: util.False(),
130130
},
@@ -134,11 +134,11 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
134134
},
135135
EnablePatroniFailsafeMode: util.True(),
136136
},
137-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/14/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":false}}}`,
137+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/15/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":false}}}`,
138138
},
139139
{
140140
subtest: "Patroni failsafe_mode disabled globally, configured for cluster",
141-
pgParam: &acidv1.PostgresqlParam{PgVersion: "14"},
141+
pgParam: &acidv1.PostgresqlParam{PgVersion: "15"},
142142
patroni: &acidv1.Patroni{
143143
FailsafeMode: util.True(),
144144
},
@@ -148,7 +148,7 @@ func TestGenerateSpiloJSONConfiguration(t *testing.T) {
148148
},
149149
EnablePatroniFailsafeMode: util.False(),
150150
},
151-
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/14/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":true}}}`,
151+
result: `{"postgresql":{"bin_dir":"/usr/lib/postgresql/15/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{"failsafe_mode":true}}}`,
152152
},
153153
}
154154
for _, tt := range tests {
@@ -180,15 +180,15 @@ func TestExtractPgVersionFromBinPath(t *testing.T) {
180180
},
181181
{
182182
subTest: "test current bin path against hard coded template",
183-
binPath: "/usr/lib/postgresql/12/bin",
183+
binPath: "/usr/lib/postgresql/15/bin",
184184
template: pgBinariesLocationTemplate,
185-
expected: "12",
185+
expected: "15",
186186
},
187187
{
188188
subTest: "test alternative bin path against a matching template",
189-
binPath: "/usr/pgsql-12/bin",
189+
binPath: "/usr/pgsql-15/bin",
190190
template: "/usr/pgsql-%v/bin",
191-
expected: "12",
191+
expected: "15",
192192
},
193193
}
194194

@@ -1849,7 +1849,7 @@ func TestSidecars(t *testing.T) {
18491849

18501850
spec = acidv1.PostgresSpec{
18511851
PostgresqlParam: acidv1.PostgresqlParam{
1852-
PgVersion: "12.1",
1852+
PgVersion: "15",
18531853
Parameters: map[string]string{
18541854
"max_connections": "100",
18551855
},

0 commit comments

Comments
 (0)