Problems Updating A Major Version Of Postgres

I have just updated to 6.5.0 and just also updated in the target Postgres to the latest version. When I have done this though I can not start my local docker.

I have noticed that it says Postgres 11 is not compatable.

It also mention my docker-compose is obsolete.

I can put it back to older versions and it runs but would like to update. Anybody any ideas how to update this?

Thanks,

Hi @jmartland22,
BACKUP FIRST and try switching the OS from Alpine to Debian 11 Bullseye and re-deploy.

Thanks Cheese.

Just changed that the target and checked the webserver to confirm it has changed.

Now I am getting this on the database

image

Then when I try and view the database connection I get

Just looked inside docker and I am getting

Thanks

Could you try rebooting the server/container?

Thanks @Cheese

Just been looking around and seems you can’t change from Postgres 11 to a new version. Looks like you have to upgrade this - https://github.com/docker-library/postgres/issues/682 . I would not have a clue how to do this though - https://www.postgresql.org/docs/current/pgupgrade.html. Wonder if there is a Wappler way of doing it?

Thanks,

You’re welcome. Yes I just looked up the error and appears there is a confliction that goes back some time. I’m not sure there is a Wappler way? Can you not roll back the Postgres version? I’m a MySQL user so all things Postgres are quite unknown to me unfortunately.

Thanks again. Yeah I’ve been putting it off for years but I think 11 is now end of life. So I thought why theres a new major update of wappler I should update everything.

Guess I’ll try update it and if I’m successful will post the solution here. Just before I do @Teodor is there any simple way to do this?

Thanks,

Postgres 15.3.x really needs to be removed from the options if it is not compatible. As do any other incompatible versions. Surprised this has not come up before.

Well I’m not sure if the Postgres 15 is the problem here but just the big step from 11 to 15

You might want to try much smaller steps, like first to 12 then 13 etc

Thanks but if I change from 11 to 12 I get the same error.

Think I need to use the pg_upgrade command but not sure how to do this.

Well then the only thing left is to do a full database backup first and restore it with the new Postgres version.

You can actually do a full database backup from the publishing toolbar below in Wappler ( next to the deploy options) it will be then saved as files and used when you deploy a fresh new instance.

You might also want to perform a full database backup first with other tools as well just to be sure first.

This can be dangerous so Backup, backup, backup!!

After that the steps in Wappler will be:

  1. Make sure you have the right target active
  2. Make a full database backup by clicking on make db backup button in the bottom toolbar
  3. When successful then select to shutdown destroy the database, the icon next to deploy. This will throw the database files away but will keep the backup
  4. Change the project docker settings to use the latest Postgres 15
  5. Deploy your project. This will bring the new web and database instance and also restore the last database backup.
  6. Pray that everything goes ok
  7. If it does - have a beer :slight_smile:

:smiley:

Thank you very much that all went very smooth updated to 15.3 :slight_smile: :beers:

2 Likes