how to upgrade synapse and its accompanying pg db:

synctl start will try to start synapse in a virtual environment. you are in there, right?

source ~/synapse/env/bin/activate ... now:

pip install -U matrix-synapse

  • for some reason it asked for this module too? or something: pip install -U synapse

  • psycopg2 module is not installed: pip install -U psycopg2

  • Connection refused: copy old pg_hba.conf into new path and reload config with systemctl reload postgresql

  • check what the db is doing: systemctl status postgresql

  • upgrade it? pg_upgradecluster <oldversionnumber> main

  • check cluster status with: pg_lsclusters will give you the list of running and downded instances

during this process it will eventually say:

Warning: systemd does not know about the new cluster yet. Operations like "service postgresql start" will not handle it. To fix, run: sudo systemctl daemon-reload

eventually there should be a way to get rid of old instances too...

which the process aludes to directly once it is done, use:

pg_dropcluster --stop <oldversionnumber> main