docker-library / postgres

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

After pulling `postgres:17-bookworm` image the server is compiled with USE_FLOAT8_BYVAL, breaking already initialized databases #1273

Closed paolobarbolini closed 1 month ago

paolobarbolini commented 1 month ago
PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-10-05 10:12:27.416 UTC [1] FATAL:  database files are incompatible with server
2024-10-05 10:12:27.416 UTC [1] DETAIL:  The database cluster was initialized without USE_FLOAT8_BYVAL but the server was compiled with USE_FLOAT8_BYVAL.
2024-10-05 10:12:27.416 UTC [1] HINT:  It looks like you need to recompile or initdb.
2024-10-05 10:12:27.416 UTC [1] LOG:  database system is shut down

Looks similar to #1195

paolobarbolini commented 1 month ago

It looks like what happened is that I originally pulled the 32 bit image and then after pulling again I received the 64 bit one. I went back to the 32 bit build, dumped the database, deleted the volume, switched to the new pull and reimported the database.

tianon commented 1 month ago

Yeah, looks like an unfortunate exact case of #1195 -- glad you got it figured out! :+1: