Rezha Julio

My name is Rezha Julio
I am a chemist graduate from Bandung Institute of Technology. Currently working as Data Engineer at Traveloka.
You can reach me by email:

, @ Q Q

Powered by Hugo

filter by tags

Installing or Upgrading PostgreSQL 9.4 on Ubuntu 14.04

time to read 1 min | 131 words

I am currently having a side project that requiring JSON Blob feature on PostgreSQL 9.4. But Ubuntu 14.04 only delivering PostgreSQL 9.3 on their repositories. Now I’ll posting step by step how to install or upgrade if you already using PostgreSQL 9.3 on ubuntu 14.04 to PostgreSQL 9.4.

Add PostgreSQL 9.4 repository and Import repository signing key, and update the package lists

sudo echo 'deb trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list

wget --quiet -O - | \
  sudo apt-key add -

sudo apt-get update

Install PostgreSQL 9.4 and pgAdmin III

sudo apt-get install postgresql-9.4 pgadmin3

Check current clusters


Stop PostgreSQL 9.4 cluster, drop it, and upgrade PostgreSQL 9.3 cluster to 9.4

sudo pg_dropcluster 9.4 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main

Confirm only 9.4 cluster remains


PostgreSQL 9.4 failed to start on Manjaro

time to read 1 min | 71 words

After setting up Manjaro on my new working laptop, I installed PostgreSQL 9.4. When I want to start the service by running sudo systemctl start postgresql, postgresql keep failing to start.

Apparently before PostgreSQL can function correctly on Arch Linux based distro, the database cluster must be initialized by the postgres user. Fix this just by running the following command:

sudo -i -u postgres
initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'


  1. java 101 (13):
    Apr 29, 2017 - Translating Scanner tokens into primitive types
  2. python data structure (5):
    May 03, 2017 - Enhance your tuples
  3. python function (2):
    Apr 16, 2017 - Lambda Functions in Python
  4. python generator (4):
    Apr 26, 2017 - Next, Function or Method ?

Friends of Rezha