whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link

Postgres 14 exits due to version incompatibility #6

Closed gokulprathin8 closed 1 year ago

gokulprathin8 commented 1 year ago

I am getting the following error message on Docker version 20.10.21, build baeda1f

Log:

2023-01-17 16:09:23 
2023-01-17 16:09:23 PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-01-17 16:09:23 
2023-01-17 16:16:22 
2023-01-17 16:16:22 PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-01-17 16:16:22 
2023-01-17 16:16:26 
2023-01-17 16:16:26 PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-01-17 16:16:26 
2023-01-17 16:09:23 2023-01-17 21:09:23.872 UTC [1] FATAL:  database files are incompatible with server
2023-01-17 16:09:23 2023-01-17 21:09:23.872 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 14.6 (Debian 14.6-1.pgdg110+1).
2023-01-17 16:16:22 2023-01-17 21:16:22.992 UTC [1] FATAL:  database files are incompatible with server
2023-01-17 16:16:22 2023-01-17 21:16:22.992 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 14.6 (Debian 14.6-1.pgdg110+1).
2023-01-17 16:16:26 2023-01-17 21:16:26.718 UTC [1] FATAL:  database files are incompatible with server
2023-01-17 16:16:26 2023-01-17 21:16:26.718 UTC [1] DETAIL:  **The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 14.6 (Debian 14.6-1.pgdg110+1).**
turukawa commented 1 year ago

@gokulprathin8 this isn't stack related, but I've seen it happen if you have gotten partway through a docker build, then deleted and restarted. You may have a hanging volume with the database in it. Delete that and start again, and it should go through.

turukawa commented 1 year ago

Closing for lack of response.