After updating our community edition containers I am unable to start the whole stack, because the pg-gvm Container brings the following error messages:
pg-gvm-1 | ERROR: existing data is for PostgreSQL 13 but installed version is 17
pg-gvm-1 | ERROR: please update your compose file for a postgres database migration or download the newest version from https://greenbone.github.io/docs/latest/_static/docker-compose.yml
pg-gvm-1 exited with code 1 (restarting)
I don’t really know how to solve the problem. Is there a decent Docker image tag list besides ‘latest’ so that I can return to an older PG image somehow?
And how do I upgrade the PG DB via Docker? I only found info regarding pg cluster, but it does not seem to fit for Docker, at least I don’t quite understand how…
→ So why should I have expected the Postgres version to change?
→ How shall I deal with it?
→ Why doesn’t the PG image handle DB upgrades automatically?
And IF I am ought to handle it myself, then please tell me how I can temporarily switch back to a working PG image to care for an update?
please update your compose file for a postgres database migration or download the newest version from https://greenbone.github.io/docs/latest/_static/docker-compose.yml
The error message says you need to update your compose file or download the latest one.
So what’s missing from the error message? What do you need? How can we improve it?
Because our container images are based on some distribution image. In this case Debian. From time to time Debian creates new releases. These new releases come with a new PostgreSQL major version. Every new PostgreSQL major version requires a complete database migration. At some time old releases don’t get any updates anymore. Thus an update of the base container image and therefore the PostgreSQL version is inevitable.
If you don’t want this you can use the pg-gvm:22.6.10 container image in your compose file. This container image is still based on Debian Bullseye (currently oldoldstable) and comes with PostgreSQL 13. But you still need to update your compose file.
Because of separation of concerns. We introduced a new separated container image handling the PostgreSQL database upgrades. This change is mentioned in our docs too.
AHH! Many thanks! That was what I’ve been looking for. I did not notice the migrator container, only the information about migration on a bare metal installation.
But the second information regarding the older image tag did the trick, so I have time to figure out, when to start the migration and get the rest up and running for now.
Is there a tag list anywhere so that one can figure this out on its own?