Posts

Showing posts from May, 2020

How to Upgrade PostgreSQL 10 Cluster to 12 in Ubuntu 20.04

When I upgraded my Ubuntu 18.04 to 20.04, the postgresql package was upgraded from version 10 to 12. But the upgrade couldn't remove the postgresql-10 package, because there were v10 clusters in my system, and I had to manually upgrade them. This is how I migrate the v10 cluster to v12 cluster.

To begin with, Postgre has this pg_upgrade command. Here is the link to the documentation. The syntax is as follows:

pg_upgrade -b oldbindir -B newbindir -d oldconfigdir -D newconfigdir[option...]
It is in /usr/lib/postgresql/<version>/bin/ directory. But when I ran this command within my linux user context, I got Permission denied. It also forbids running as sudo either. The only way that makes sense now is running this command as postgres. Please note that I'm using the --check flag below to avoid running the real migration. And don't forget to stop the postgresql service beforehand.
chris@focal:~$ sudo systemctl stop postgresql chris@focal:~$ sudo su - postgres postgres@focal:~…

Monkey Patching Vagrant LXC Issue in Ubuntu 20.04

Image
Ubuntu 20.04 Focal Fossa was officially launched just a couple of weeks ago. And I thought it was the best time to say goodbye to my Ubuntu 18.04. Looking back then, I was so determined entering the world of Ubuntu 20.04. But little that I knew, I will be losing sleep figuring out why my vagrant lxcs won't "vagrant up".  

It started with my attempt to upgrade the operating system. I opened up the Software Updater, but there was no upgrade offer anywhere in the prompt. I checked the settings in Software & Updates app. Looked into the "Updates" tab, the "Notify me of a new Ubuntu version:" option said: "For long term support version". Well, 20.04 is an LTS, isn't it. It should be there, but why it isn't?

Changing the option to "For any new version", prompted me with 19.10 upgrade but no thanks, 19.10 is so yesterday.What have I missed? Googled it and I found that Software Updater won't give you the prompt, until the do…