diff --git a/docs/postgres-migration.md b/docs/postgres-migration.md new file mode 100644 index 00000000000..180f7d88b69 --- /dev/null +++ b/docs/postgres-migration.md @@ -0,0 +1,27 @@ +# Migrating from jobs/postgres-13 to jobs/postgres + +## Background + +The `postgres-13` job shipped inside the bosh release is deprecated and will be +removed in the next release. The `postgres` job (PostgreSQL 15) is the +supported replacement. + +## Switching from jobs/postgres-13 to jobs/postgres + +The `postgres` job in the bosh release runs PostgreSQL 15 and handles the +major-version upgrade from 13 automatically. + +Update your director manifest to replace the `postgres-13` job with `postgres`: + +```yaml +instance_groups: +- name: bosh + jobs: + - name: postgres # was: postgres-13 + release: bosh +``` + +No property changes are needed — both jobs share the same `postgres.*` +property namespace. On the first deploy, the `postgres` job detects the +existing `/var/vcap/store/postgres-13` data directory and runs `pg_upgrade` +to PostgreSQL 15 automatically. diff --git a/jobs/postgres-13/spec b/jobs/postgres-13/spec index efc3d021b84..6f7eebacf2f 100644 --- a/jobs/postgres-13/spec +++ b/jobs/postgres-13/spec @@ -1,5 +1,6 @@ --- name: postgres-13 +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." templates: bpm.yml: config/bpm.yml diff --git a/jobs/postgres-13/templates/pre-start.erb b/jobs/postgres-13/templates/pre-start.erb index 64a49f9bac7..4e2286364d3 100755 --- a/jobs/postgres-13/templates/pre-start.erb +++ b/jobs/postgres-13/templates/pre-start.erb @@ -1,5 +1,8 @@ #!/bin/bash +echo "WARNING: The postgres-13 job is deprecated and will be removed in the next bosh release." +echo "WARNING: Migrate to the postgres job from cloudfoundry/postgres-release. See docs/postgres-migration.md" + set -eu set -o pipefail