Skip to content

Commit 7755c30

Browse files
committed
feat: deprecate postgres-13 job and schedule removal in next release
The postgres-13 job will be removed in the next bosh release. Operators should migrate to cloudfoundry/postgres-release. See docs/postgres-migration.md for upgrade instructions. Signed-off-by: Pascal Zimmermann <pascal.zimmermann01@sap.com>
1 parent 39972c7 commit 7755c30

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

docs/postgres-migration.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Migrating from bosh postgres jobs to cloudfoundry/postgres-release
2+
3+
## Background
4+
5+
The `postgres` and `postgres-13` jobs previously shipped inside the bosh release
6+
have been removed. PostgreSQL is now provided by the
7+
[cloudfoundry/postgres-release](https://github.com/cloudfoundry/postgres-release).
8+
9+
This release ships PostgreSQL versions 15, 16, 17, and 18.
10+
11+
## Switching from jobs/postgres (bosh release)
12+
13+
In your director manifest, replace:
14+
15+
```yaml
16+
releases:
17+
- name: bosh
18+
version: latest
19+
20+
instance_groups:
21+
- name: bosh
22+
jobs:
23+
- name: postgres
24+
release: bosh
25+
properties:
26+
postgres:
27+
user: bosh
28+
password: secret
29+
database: bosh
30+
listen_address: 127.0.0.1
31+
port: 5432
32+
max_connections: 200
33+
```
34+
35+
With:
36+
37+
```yaml
38+
releases:
39+
- name: bosh
40+
version: latest
41+
- name: postgres
42+
url: https://bosh.io/d/github.com/cloudfoundry/postgres-release
43+
version: latest
44+
45+
instance_groups:
46+
- name: bosh
47+
jobs:
48+
- name: postgres
49+
release: postgres
50+
properties:
51+
databases:
52+
version: 15 # match your existing on-disk data version
53+
port: 5432
54+
max_connections: 500
55+
databases:
56+
- name: bosh
57+
roles:
58+
- name: bosh
59+
password: secret
60+
```
61+
62+
## Switching from jobs/postgres-13
63+
64+
Same as above, but set `databases.version: 13`.
65+
66+
## In-place cutover procedure
67+
68+
1. Set `databases.version: 15` (or 13 if still on postgres-13).
69+
postgres-release detects the existing `/var/vcap/store/postgres-<version>`
70+
data directory and starts without reinitializing.
71+
2. Deploy. BOSH will restart the postgres process using postgres-release.
72+
3. To upgrade to a newer PostgreSQL major version, change `databases.version`
73+
to 16, 17, or 18 and redeploy. postgres-release handles `pg_upgrade`.
74+
75+
## Property mapping
76+
77+
| Old (`bosh` release) | New (`postgres-release`) |
78+
|---------------------------------|----------------------------------------------|
79+
| `postgres.user` | `databases.roles[0].name` |
80+
| `postgres.password` | `databases.roles[0].password` |
81+
| `postgres.database` | `databases.databases[0].name` |
82+
| `postgres.additional_databases` | additional `databases.databases` entries |
83+
| `postgres.listen_address` | `databases.address` (default `127.0.0.1`) |
84+
| `postgres.port` | `databases.port` (default `5432`) |
85+
| `postgres.max_connections` | `databases.max_connections` (default `500`) |

jobs/postgres-13/spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: postgres-13
3+
description: "DEPRECATED: This job will be removed in the next bosh release. Use the postgres job from cloudfoundry/postgres-release instead. See docs/postgres-migration.md for upgrade instructions."
34

45
templates:
56
bpm.yml: config/bpm.yml

jobs/postgres-13/templates/pre-start.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
echo "WARNING: The postgres-13 job is deprecated and will be removed in the next bosh release."
4+
echo "WARNING: Migrate to the postgres job from cloudfoundry/postgres-release. See docs/postgres-migration.md"
5+
36
set -eu
47
set -o pipefail
58

0 commit comments

Comments
 (0)