Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database files are incompatible with server #228

Closed
svdeveloper1 opened this issue Feb 15, 2021 · 2 comments
Closed

database files are incompatible with server #228

svdeveloper1 opened this issue Feb 15, 2021 · 2 comments

Comments

@svdeveloper1
Copy link

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
Copy link
Member

ImreSamu commented Feb 15, 2021

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.. 😞

... 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

  • FROM postgres:13 as builder to FROM postgres:13-beta1 as builder
  • FROM postgres:13 to FROM postgres:13-beta1

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

@svdeveloper1
Copy link
Author

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.

ImreSamu added a commit to ImreSamu/docker-postgis that referenced this issue Jul 14, 2021
- No "postgres:14" images; only "postgres:14beta2" and "postgres:14beta2-alpine"
so I have made some quick&dirty changes
The Postgres-betas internal format can be change; so the new tagging is better for the users.
typical error: "The database cluster was initialized with CATALOG_VERSION_NO"
related: postgis#228

- I have updated some upstream master to main.
phillipross pushed a commit that referenced this issue Jul 14, 2021
* add 14beta2 update scripts

- No "postgres:14" images; only "postgres:14beta2" and "postgres:14beta2-alpine"
so I have made some quick&dirty changes
The Postgres-betas internal format can be change; so the new tagging is better for the users.
typical error: "The database cluster was initialized with CATALOG_VERSION_NO"
related: #228

- I have updated some upstream master to main.

* add 14beta2-3.1/* files ; generated by ./update.sh

* Manual update the alpine files to 3.1.3

The debain version is still on 3.1.2 ; but this unmodified version is not working with beta2
see: https://postgis.net/2021/07/02/postgis-3.1.3/

* add updated (12|13)-master Dockerfiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants