← Go back to FSCI Service Status

Postgres version update for codema.in

January 29, 2026 at 12:00 PM

loomio

Resolved after 15m of downtime. January 29, 2026 at 12:15 PM

Postgres in the docker-compose of codema.in was at version 9.6. We went to version 18.1. Steps are documented below.

Loomio was updated from stable (3.0.9) to latest (3.0.17)

Postgres upgrade steps

Stopping codema

docker compose down

Starting only db for dump

docker compose up -d db

Taking a dump

docker exec loomio-db pg_dump --clean --create loomio_production -U postgres > db.sql

Stop the db after dump

docker compose down 

Moving the old data directory to new location (also makes for a backup)

sudo mv pgdata pgdata-backup

Upgrading postgres

vim .env
# Note the current version (9.6) and edit the postgres container version in .env to 18 
docker compose pull
docker compose up -d db

Copying dump to new instance

docker cp db.sql loomio-db:/db.sql

Restoring dump inside new instance

docker exec -it loomio-db bash
# Once inside container
psql -U postgres -f /db.sql

Restarting services

docker compose down
docker compose up -d

Last updated: January 29, 2026 at 12:20 PM