Homebrew on mac has a long-standing upgrade bug with Postgres extensions like postgis. It uninstalls the old postgis before copying the data over and then gets stuck in a hard to recover state. I always assume I’m going to lose all my data whenever I update major versions.