postgis / docker-postgis

Docker image for PostGIS
https://hub.docker.com/r/postgis/postgis/
MIT License
1.37k stars 462 forks source link

database files are incompatible with server #228

Closed svdeveloper1 closed 3 years ago

svdeveloper1 commented 3 years ago

Hi,

I'm getting an error on a docker container, which uses postgis/postgis:13-master.

The error: DETAIL: The database cluster was initialized with CATALOG_VERSION_NO 202005171, but the server was compiled with CATALOG_VERSION_NO 202007201. HINT: It looks like you need to initdb.

The error occurred after pulling thew new image and restarted the docker-compose.

To fix this, I believe I need an image using CATALOG_VERSION_NO 202005171, however I'm able to locate any Dockerfile that was created around the time in https://github.com/postgis/docker-postgis.

The only relevant files I found are the following. They are both updated at the same time but the contents are different. https://github.com/postgis/docker-postgis/blob/master/13-master/Dockerfile https://github.com/postgis/docker-postgis/blob/master/13-3.1/Dockerfile

Could you please tell me when these files actually have changed and which is older and could be using CATALOG_VERSION_NO 202005171?

Kind regards, Hiroki Gota

ImreSamu commented 3 years ago

CATALOG_VERSION_NO 202005171?

checking the upstream issues : https://github.com/docker-library/postgres/search?q=202005171&type=issues this is a "known tagging problem" ( fixed few months ago )
and your CATALOG created with postgres:13-beta1 based on this issue

the real problem - no 13-beta1 postgis tags.. :disappointed:

... postgis/postgis:13-master. .... The only relevant files I found are the following. They are both updated at the same time but the contents are different. https://github.com/postgis/docker-postgis/blob/master/13-master/Dockerfile

imho: try to modify the latest 13-master/Dockerfile and re-build

or try to modify the 13-3.1/Dockerfile ( to postgres:13-beta1 )

svdeveloper1 commented 3 years ago

Thank you @ImreSamu for your response.

I've tried creating another image as suggested FROM postgres:13 as builder to FROM postgres:13-beta1 as builder but still getting the same error, which means 13-beta1 uses 202007201.

I fixed it by removing the volume and then re-created the volume/container; restore the database from our nightly backup.

I'll also create our own image based on the official to prevent this error.

Thanks again for your help.