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

Pulling and running the latest container gives version mismatch error - wouldn't it be better if this was handled in a wrapper/startup script? #157

Closed
ghost opened this issue May 19, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented May 19, 2016

Pulling and running the latest container gives us the following version mismatch error:

The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.0

There are lengthier guides e.g. on Stackoverflow or the PostgreSQL docs how to fix this. However, the docker image is quite a controlled environment and it would be usually known to you (the image creators) which version was previously used, so all the information to run pg_upgrade automatically when such a situation is detected should be available.

Therefore, wouldn't it be better if this was automatically handled in a wrapper/startup script? This way the image will "just work" for people (unless they skip major versions by not updating it for a long time) even if postgresql is bumped to a newer version.

@yosifkit
Copy link
Member

As I understand the upgrade process, this is unfortunately not simple to handle. It requires that both versions of the postgres server be installed (and running?) simultaneously which we would then have to either have installed or install it on start up of the container. Both of them need their own directory for their database, which would require extra copying of the database files to get them back into the volume once the upgrade is complete.

See also #37 for more discussion.

(closing as duplicate)

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

1 participant