There was a change to the original database to use it more effectively. Check the release notes for the 2023.4.0 and some follow up cleanup on the one after that.
It says depending on the size of the database it could take some time for it finish.
There other changes for other databases as well. SQL, MariaDB, etc
Unfortunately I didn’t get better overnight. I now resorted to restoring a backup and everything is working normally again. Will avoid further upgrade attempts for a while. An LTS version of Home Assistant would be nice…