Add free space check to pre-flight for pg-upgrade
Summary
We don't currently check available space before upgrading the database. This leaves us open to an upgrade failing due to lack of free space, or an instance running out of free space soon after the upgrade.
Proposal
We should do a check before upgrading for how much free space there is in the partition the database is using, and back out if it is below a certain threshold. There usually isn't a big difference in space usage between database upgrades, so I think something like if 2*CURRENT_SPACE_USAGE > 90% available space we should back out.
There should be an option to bypass this check as well.
Edited by Chun Du