Postgres 13 upgrade #58

Open
opened 2025-05-26 10:59:11 -04:00 by aaron_nad · 3 comments

Hi,

Currently the docker-compose and files support postgres13 only. Is there a plan to ensure compatibility with later versions.

Postgres13 goes EOL in November this year (2025).

https://www.postgresql.org/support/versioning/

Releases

Version Current minor Supported First Release Final Release
17 17.5 Yes September 26, 2024 November 8, 2029
16 16.9 Yes September 14, 2023 November 9, 2028
15 15.13 Yes October 13, 2022 November 11, 2027
14 14.18 Yes September 30, 2021 November 12, 2026
13 13.21 Yes September 24, 2020 November 13, 2025
Hi, Currently the docker-compose and files support postgres13 only. Is there a plan to ensure compatibility with later versions. Postgres13 goes EOL in November this year (2025). https://www.postgresql.org/support/versioning/ Releases |Version |Current minor |Supported |First Release |Final Release| | --- | --- | --- | --- | --- | |17 |17.5 |Yes |September 26, 2024 |November 8, 2029| |16 |16.9 |Yes |September 14, 2023 |November 9, 2028| |15 |15.13 |Yes |October 13, 2022 |November 11, 2027| |14 |14.18 |Yes |September 30, 2021 |November 12, 2026| |13 |13.21 |Yes |September 24, 2020 |November 13, 2025|
Owner

I think you should be able to modify postgres:13 in the docker-compose.yml to postgres:17 for a new database with no problems (and should be fully supported), but if you need to migrate an existing database, you'll need to update the database somehow (traditionally manually dumping and restoring the database).

I need to do more research if there are any docker images that can help with this, I think https://github.com/pgautoupgrade/docker-pgautoupgrade may work automatically but I have yet to try it. However, from reading the readme it seems like if you just change postgres:13 to pgautoupgrade/pgautoupgrade:17-alpine, it should update it for you automatically!

I need to migrate my instances as well so I will definitely be doing this, thank you for the reminder!

I think you should be able to modify `postgres:13` in the `docker-compose.yml` to `postgres:17` for a new database with no problems (and should be fully supported), but if you need to migrate an existing database, you'll need to update the database somehow (traditionally manually dumping and restoring the database). I need to do more research if there are any docker images that can help with this, I think https://github.com/pgautoupgrade/docker-pgautoupgrade may work automatically but I have yet to try it. However, from reading the readme it seems like if you just change `postgres:13` to `pgautoupgrade/pgautoupgrade:17-alpine`, it should update it for you automatically! I need to migrate my instances as well so I will definitely be doing this, thank you for the reminder!
Owner

Yo I just ran this on my instance and it worked like a charm!!! I'll add a line in the readme for db instructions, but I just changed postgres:13 to pgautoupgrade/pgautoupgrade:17-alpine, did my regular docker-compose up -d, and then changed it back to postgres:17 with docker-compose up -d just to avoid needing to recheck the database version on every boot.

All the postgres updates that I know about are fully backwards compatible so there shouldn't be an issue updating the database ahead of my repo in the future as well. I hope this helps!

Yo I just ran this on my instance and it worked like a charm!!! I'll add a line in the readme for db instructions, but I just changed `postgres:13` to `pgautoupgrade/pgautoupgrade:17-alpine`, did my regular `docker-compose up -d`, and then changed it back to `postgres:17` with `docker-compose up -d` just to avoid needing to recheck the database version on every boot. All the postgres updates that I know about are fully backwards compatible so there shouldn't be an issue updating the database ahead of my repo in the future as well. I hope this helps!
Owner

Thank you so much for this, this makes db updates so easy now I've been updating all the databases on my server, including this gitea one which should be much faster now as well, this is awesome!!

Thank you so much for this, this makes db updates so easy now I've been updating all the databases on my server, including this gitea one which should be much faster now as well, this is awesome!!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shibao/cannery#58
No description provided.