Upgrade to Central v2023.2 fails at "Stopping postgres server"

Hi @sokolic, before going further, do you have a full backup of your system? If so, you might try restoring the backup and going through the upgrade process again.

The error message from PostgreSQL suggests there's an open connection to the database. Is it possible there is another process which is accessing the database? This could be from one of the ODK Central docker containers, or from elsewhere in your system, or externally.

You could check for other docker containers with docker ps. The normal upgrade steps should have stopped all ODK Central containers.

You can also check from inside PostgreSQL with SELECT * FROM pg_stat_activity;. You should be able to run this from outside the container with:

docker exec central-postgres-1 psql -U YOUR_USERNAME -W -d YOUR_DATABASE_NAME -c 'SELECT * FROM pg_stat_activity'

There is discussion of a similar-looking issue at I can't upgrade from v1.5.3.