Upgrading PostgreSQL database on your dev setup after OS upgrade

Fedora 34 ships with new major version of PostgreSQL (v13) which requires a manual database upgrade and reindex. Here is how to do this, instructions for Fedora or Red Hat OSes:

sudo dnf install postgresql-upgrade
sudo postgresql-setup --upgrade
sudo systemctl restart postgresql
sudo su postgres -s /bin/bash
bash-5.1$ reindexdb --all
bash-5.1$ exit

Hope it was useful, cheers!