Upgrade PostgreSQL from 9.4/9.5 to 9.6
After upgrading everything in Homebrew, I discovered that my PostgreSQL no longer loaded, due to the database files being an older version than the PostgreSQL software. These are the steps I followed to upgrade all databases, and get up and running again.
1: Make sure PostgreSQL is not running before starting the upgrade process.
2: Make a new PostgreSQL 9.6 database where your old data will be migrated to.
3: Upgrade databases to 9.6 by using pg_upgrade
tool. To find the version number of the
old binaries, you simply ls /usr/local/Cellar/postgresql
.
Change the version numbers needed for your setup, usage of the pg_upgrade tool is as simple as:
4: Move your new database to the PostgreSQL default location:
5: That’s it :)
Recent Posts
Extend ActiveStorage::Blob with callbacks
ActiveStorage is currently missing both validations and callbacks, but you can easily extend it with the callbacks you need.
Writing a custom analyzer for ActiveStorage
Writing custom analyzers for your ActiveStorage blogs is not well documented, but quite easy. This is how I implemented a simple EDI file analyzer for my neverending hobby project.
Manjaro/Arch: transfer packages to another computer
How to make a backup of all installed packages on a Arch/Manjaro distro, and install them on a different machine.