I am using the beta versions of PostgreSQL 16 under Ubuntu (22.04). An issue is that every time (three times so far) a new beta is released, the existing database/cluster has to be upgraded due to some format change.
The Ubuntu upgrade program showed the sequence of commands that needs to be copied and executed. But this has been tedious and error-prone as I have to do this on multiple machines. And I had experience with failed database upgrades leading to an unusable state.
To avoid the trouble, I just uninstall and purge all traces of PostgreSQL and reinstall it to the new version. But this is a bit time consuming.
My Question is:
Is there a reliable way to remove just the main cluster and then recreate it?
P.S. I use only one version of PostgreSQL and one main cluster. The database is dumped before the upgrade.