fix: pin PGDATA so the postgres 18 bump upgrades in place
All checks were successful
cc-ci/testme cc-ci: success
All checks were successful
cc-ci/testme cc-ci: success
postgres:18 (tracked by pgautoupgrade) relocated the default PGDATA from /var/lib/postgresql/data to /var/lib/postgresql/18/docker. Since the db volume is mounted at the legacy path, pg18 would init a fresh empty cluster there and orphan all existing data (pgautoupgrade never runs the upgrade). Pinning PGDATA to the legacy path makes pg18 find the existing cluster and upgrade it in place.
This commit is contained in:
@ -128,6 +128,10 @@ services:
|
||||
secrets:
|
||||
- db_password
|
||||
environment:
|
||||
# postgres:18 relocated the default PGDATA to /var/lib/postgresql/18/docker.
|
||||
# Pin it to the legacy path so pgautoupgrade finds the existing cluster on the
|
||||
# mounted volume and upgrades it in place, instead of init'ing an empty one.
|
||||
- PGDATA=/var/lib/postgresql/data
|
||||
- LC_COLLATE=C
|
||||
- LC_CTYPE=C
|
||||
- POSTGRES_DB=synapse
|
||||
|
||||
Reference in New Issue
Block a user