docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.14k stars 1.11k forks source link

PostgreSQL version 15 is not compatible with version 16.0 (Debian 16.0-1.pgdg120+1). #1125

Closed KLISCHE-HW closed 10 months ago

KLISCHE-HW commented 10 months ago

I have installed easypanel.io in an Ubuntu 22.04 enviroment and got suddenly this error message: The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0 (Debian 16.0-1.pgdg120+1).

yosifkit commented 10 months ago

The PostgreSQL data directory is not compatible between major versions, so the quick fix is to not use postgres:latest but to use the more specific postgres:15 to be compatible with your data directory.

There is more discussion on upgrading between major versions in https://github.com/docker-library/postgres/issues/37

Related issue: https://github.com/docker-library/postgres/issues/157