Be really clear about status of `data.X` directory after pg-upgrade failure
Summary
Out of an abundance of caution, when gitlab-ctl pg-ugprade
fails, we leave the /var/opt/gitlab/postgresql/data.#{NEW_VERSION}
directory in place. Before gitlab-ctl pg-upgrade
can be run again, it needs to not exist, otherwise the upgrade will fail again with an error regarding the existence of the directory
As long as the GitLab installation is functioning, it should be safe to remove this directory. It is a temporary directory that we create with the new version of the database, and is moved into use after everything else checks out.
It may not be clear from the existing documentation and error messages what should be done about this directory.
Proposal
We should make the documentation and error messages clearer on what needs to be done about this directory.