Upgrading Between Major Versions of PostgreSQL on FreeBSD
Upgrading major versions of PostgreSQL on FreeBSD (e.g. from 12 to 13) can be tricky. The challenge is that pkg upgrade removes the old binaries before installing the new ones, but pg_upgrade requires both versions to be present to migrate your data. If you just delete the old package and install the new one, you're left without the old binaries needed to read your existing data format.

.png)