-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
With Postgres 18 the Docker Official Image appears to have changed the expected mount target.
Observed behavior:
- Mounting a volume at /var/lib/postgresql/data (the historical default) now fails at container start with a runc error like:
“error mounting ... to rootfs at /var/lib/postgresql/data: ... no such file or directory”. - Mounting the same volume at /var/lib/postgresql works and the container starts fine.
Impact:
- A huge amount of deployment tooling assumes /var/lib/postgresql/data by default:
Helm charts, Kubernetes operators/manifests, Terraform/Ansible roles, docker-compose examples, CI templates, etc.
This change breaks upgrades 17 → 18 with no action from users, often in production.
Requests:
- Document prominently in the README/release notes for 18+ that the recommended mount has changed to /var/lib/postgresql,
plus a clear upgrade/migration note (including PGDATA defaults for 18). - Provide a backward-compatibility path so that mounting at /var/lib/postgresql/data still works, e.g.:
- Create the legacy directory in the image and allow either path to be a valid mountpoint; or
- Add an entrypoint fallback that accepts both /var/lib/postgresql and /var/lib/postgresql/data; or
- Provide an opt-in compat flag/tag/env (e.g. POSTGRES_COMPAT_MOUNT=1) that makes /var/lib/postgresql/data valid again; or
- Ship a symlink that preserves the legacy target (if acceptable from a security/packaging standpoint).
This would greatly ease upgrades because so many ecosystems hard-code the legacy path.
Happy to provide exact error logs and minimal reproducer if needed.
zandercodes
Metadata
Metadata
Assignees
Labels
No labels