Skip to content

issues with replaced docker tags #784

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

Closed
mdeanda opened this issue Nov 11, 2020 · 6 comments
Closed

issues with replaced docker tags #784

mdeanda opened this issue Nov 11, 2020 · 6 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@mdeanda
Copy link

mdeanda commented Nov 11, 2020

while migrating from one host to another i found that postgres stopped working. while starting up the same "version" i got the following error:

The database cluster was initialized with CATALOG_VERSION_NO 202005171, but the server was compiled with CATALOG_VERSION_NO 202007201.

it appears that the image: postgres:13 and postgres:13.0 is misleading and gets updated frequently and each update will break existing databases and will need to somehow get the last version of the database software running to do a pg_dump on but i'm not sure as i thought i was running 13.0.

i can see that latest may change frequently but tags with versions on them are expected to run a known version. i think it matters more when the software can't automatically migrate between minor version updates.

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Nov 11, 2020
@wglambert
Copy link

There are more specific tags that you can use to get an exact version
https://hub.docker.com/_/postgres/?tab=tags&page=1&name=13

postgres:13-rc1 matches your catalog version, and was updated to 13.0-1.pgdg100+1 a little over a month ago 8d28111

$ docker run -d --rm --name postgres -e POSTGRES_PASSWORD=pass postgres:13-rc1
812900e87aed559520a9f76fc9b30c3914a3f565de225ff1ff110ed6d1ee57f0

$ docker exec postgres cat /usr/share/postgresql/13/catalog_version
202007201

@tianon
Copy link
Member

tianon commented Nov 11, 2020

See also https://www.postgresql.org/developer/beta/ for information from the PostgreSQL community regarding the use of beta/pre-release versions, especially:

PostgreSQL beta and release candidate release are not meant for use in production systems.
...
Features are subject to changes that are backwards incompatible at any time during the development of the betas, and could possibly be removed altogether.

So this is unfortunately "by design" in the PostgreSQL world.

@tianon tianon closed this as completed Nov 11, 2020
@yosifkit
Copy link
Member

Also, same as #662 which was about pre-release 12 (and 13: #662 (comment))

@0xfff
Copy link

0xfff commented Dec 17, 2020

I hit the same problem today.
How can i roll back to 13.0 to restore my DBs?

Looking at the images here : https://hub.docker.com/_/postgres/?tab=tags&page=1&name=13
It appears that the image for 13.0 and 13.1 are identical

for linux/amd64

postgres:13
DIGEST:sha256:b6a3459825427f08ab886545c64d4e5754aa425c5eea678d5359f06a9bf7faab

postgres:13.1
DIGEST:sha256:b6a3459825427f08ab886545c64d4e5754aa425c5eea678d5359f06a9bf7faab

Or am I confused?

Should I use this image:
https://hub.docker.com/layers/postgres/library/postgres/13.0/images/sha256-832e01fa055c55a9c9195db231cf3935a81b7b60c8cccd64e7b5395d1ee1948b

Actually the one i needed is

docker pull postgres:13-beta1

$ docker run -d --rm --name postgres -e POSTGRES_PASSWORD=pass postgres:13-beta1
946c9f2b29612801e1c14d68ecddd70bd48372436d967aaaaad008ee5252ebd0

$ docker exec postgres cat /usr/share/postgresql/13/catalog_version
202005171```

@mdeanda
Copy link
Author

mdeanda commented Dec 17, 2020

@0xfff in my case, i ended up finding the sha of the version i had used before and updated my docker-compose file to use it, for example:

  postgres13:
    image: postgres@sha256:b71084d6fef0876d7e63e652b0227d965bf8515bb3dec7478af4b67bf3aa722b
    ports:
      - "5432:5432"
   ...

@tianon
Copy link
Member

tianon commented Dec 17, 2020

I've filed #797 to help alleviate this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

5 participants