You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the reminder, it has been on my list for a little while.
The tricky bit will be the upgrade path as jumping major PostgreSQL versions normally requires some dedicated upgrade steps so we can't just flip the version in the docker-compose.yml file.
So will need to document a process to do the conversion for existing installs.
docker compose stop stops but doesn't down the containers
docker run --rm --volumes-from flowfuse-postgres-1 -v $(pwd):/backup ubuntu tar czvf /backup/db-backup.tar.gz /var/lib/postgresql/data creates a back up in db-back.tar.gz in current directory
docker compose down actually down all the containers
docker run --rm -it -u postgres -v flowfuse_db:/var/lib/postgresql/14/data -v flowfuse_db16:/var/lib/postgresql/16/data tianon/postgres-upgrade:14-to-16 /usr/lib/postgresql/16/bin/pg_upgrade --old-bindir /usr/lib/postgresql/14/bin --new-bindir /usr/lib/postgresql/16/bin --old-datadir /var/lib/postgresql/14/data --new-datadir /var/lib/postgresql/16/data -U root converts old db to new format
docker run --rm -it -u postgres -v flowfuse_db:/var/lib/postgresql/14/data -v flowfuse_db16:/var/lib/postgresql/16/data tianon/postgres-upgrade:14-to-16 cp /var/lib/postgresql/14/data/pg_hba.conf /var/lib/postgresql/16/data/pg_hba.conf ensures that new PG 16 allows network connections
update docker-compose.yml to point to the newly created flowfuse_db16 volume and point to the v16 container.
docker compose up -d restart everyting.
These are PoC instructions that assume the following:
The docker-compose.yml file is in a directory called flowfuse or the docker compose commands are run with -p flowfuse
Is 16 the newest version compatible with FlowFuse or would 18 work aswell?
Also, is there anything against simply using https://github.com/pgautoupgrade/docker-pgautoupgrade ?
I've used it a couple of times in the past and it always worked like a charm.
The earlier comment is just me keeping notes as I try things. This worked and I was going to look at scripting it all for actual release.
I was trying to limit the version jump size so 16 felt like a reasonable compromise as it's good to end of 2028. There is no reason that FF shouldn't work with PG 18
119a120,121> ESQL> psql -v ON_ERROR_STOP=1 -U root flowforge <<-ESQL120a123,124> GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${DB_USER:-forge};> GRANT ALL ON SCHEMA public to ${DB_USER:-forge};127a132,133> ESQL> psql -v ON_ERROR_STOP -U root ff-context <<-ESQL128a135> GRANT ALL ON SCHEMA public to ${DB_USER:-forge}488c495< image: postgres:14---> image: postgres:16503c510< - db:/var/lib/postgresql/data---> - db16:/var/lib/postgresql/data623c630< db:---> db16:
The extra changes should only be needed for new installs with PG16
I just upgraded from version 14 to version 18 with pgautoupgrade one shot mode. Seems to have worked fine. I used the debian 18-debian image. Before I had to restructure the folders as outlined here: https://hub.docker.com/_/postgres/#pgdata
Activity
hardillb commentedon Nov 4, 2026
Thanks for the reminder, it has been on my list for a little while.
The tricky bit will be the upgrade path as jumping major PostgreSQL versions normally requires some dedicated upgrade steps so we can't just flip the version in the docker-compose.yml file.
So will need to document a process to do the conversion for existing installs.
hardillb commentedon Nov 5, 2026
Initial process to upgrade
docker compose stopstops but doesn't down the containersdocker run --rm --volumes-from flowfuse-postgres-1 -v $(pwd):/backup ubuntu tar czvf /backup/db-backup.tar.gz /var/lib/postgresql/datacreates a back up in db-back.tar.gz in current directorydocker compose downactually down all the containersdocker run --rm -it -u postgres -v flowfuse_db:/var/lib/postgresql/14/data -v flowfuse_db16:/var/lib/postgresql/16/data tianon/postgres-upgrade:14-to-16 /usr/lib/postgresql/16/bin/initdb -D /var/lib/postgresql/16/data -U rootinitialises PG 16 empty databasedocker run --rm -it -u postgres -v flowfuse_db:/var/lib/postgresql/14/data -v flowfuse_db16:/var/lib/postgresql/16/data tianon/postgres-upgrade:14-to-16 /usr/lib/postgresql/16/bin/pg_upgrade --old-bindir /usr/lib/postgresql/14/bin --new-bindir /usr/lib/postgresql/16/bin --old-datadir /var/lib/postgresql/14/data --new-datadir /var/lib/postgresql/16/data -U rootconverts old db to new formatdocker run --rm -it -u postgres -v flowfuse_db:/var/lib/postgresql/14/data -v flowfuse_db16:/var/lib/postgresql/16/data tianon/postgres-upgrade:14-to-16 cp /var/lib/postgresql/14/data/pg_hba.conf /var/lib/postgresql/16/data/pg_hba.confensures that new PG 16 allows network connectionsflowfuse_db16volume and point to the v16 container.docker compose up -drestart everyting.These are PoC instructions that assume the following:
flowfuseor the docker compose commands are run with-p flowfusedocker-compose.yml diff after change
It should also leave the original
flowfuse_dbvolume untouched making rolling back easy.ignitedPotato commentedon Nov 5, 2026
Thanks for the steps!
Is 16 the newest version compatible with FlowFuse or would 18 work aswell?
Also, is there anything against simply using https://github.com/pgautoupgrade/docker-pgautoupgrade ?
I've used it a couple of times in the past and it always worked like a charm.
hardillb commentedon Nov 5, 2026
The earlier comment is just me keeping notes as I try things. This worked and I was going to look at scripting it all for actual release.
I was trying to limit the version jump size so 16 felt like a reasonable compromise as it's good to end of 2028. There is no reason that FF shouldn't work with PG 18
As for the tool, I found a couple of options and the https://github.com/tianon/docker-postgres-upgrade version worked (after a little messing about to get the init user right)
But I have to look at the kubernetes upgrade path next so I will try the other as well as that looks to have some k8s instructions.
This may not make the next release on the 19th, but will be in the next one just before Christmas so people can apply it in the New Year.
ignitedPotato commentedon Nov 5, 2026
Sounds great.
We'll try to apply the upgrade to 18 with pgautoupgrade with a test instance and I'll let you know if that works as expected, too.
hardillb commentedon Nov 5, 2026
Updated docker-compose.yml diff
The extra changes should only be needed for new installs with PG16
ignitedPotato commentedon Nov 6, 2026
I just upgraded from version 14 to version 18 with pgautoupgrade one shot mode. Seems to have worked fine. I used the debian
18-debianimage. Before I had to restructure the folders as outlined here: https://hub.docker.com/_/postgres/#pgdatahardillb commentedon Nov 6, 2026
Ahh, so good reason for us to stop at jumping to 16 for now
hardillb commentedon Nov 11, 2026
pgautoupgrade instructions appear simpler
Bonus to this image is no need for new volume
hardillb commentedon Nov 16, 2026
Reopening until this all ships in v3.4.0