Author Archive

Postgres Upgrade from 9.1 to 9.3 and post-upgrade configs (draft notes)

Environment: Postgres 9.1 running on Ubuntu 13.04 on AWS EC2 instance with a single cluster on AWS EBS

Some pre-steps can be found here:

Get details of the present clusters:

Stop all Postgres services:

Drop new 9.3 cluster created by default during installation of postgres 9.3:

Create a new 9.3 cluster from existing 9.1 one:

Check if it worked:

Make sure you can access your data: if ok – drop 9.1 cluster:

All steps below are optional: Move data storage to an alternative location
In my case it’s an instance of Amazon EBS (Elastic Storage) mounted to /data/main

Stop all Postgres services:

Move actual directory :

Amend 9.3 configs:

Comment out old data_directory path and point it to the new location:

Check if it worked:

Start postgres:

Optional – remove /var/lib/postgresql/9.3/main created by default during 9.3 installation:

Column to String Converter
Ever had a list of column (or “who knows how”) oriented values that needed to be converted into a comma separated string? – This little web application tries to assist with this simple but sometimes annoying and time consuming task.

Please report if you find any bugs.


Convert IPython Notebook to PDF

Environment: Ubuntu 13.04, Python 3.3

This should work for ipython starting from version 1.0 (otherwise nbconvert can be installed separately):

my_notebook.pdf will be created


Installation of some additional packages and libraries may be required:


More about nbconvert formats and options at:


Interactive Data Analysis Setup on AWS


Current setup includes: Linux Ubuntu Server on EC2 (Elastic Computing Cloud) with Postgres and Python Data Analysis Tools (IPython, Numpy, Pandas, etc.) + Elastic IP + Load Balancer + EBS (Elastic Block Store)


Playing with Google Charts – Simple Visualization of Geographical Data

Visit to view the dynamic chart – WordPress is a bit cranky when it comes to JavaScript code embedded in posts, so I ended up hosting this chart externaly.
Also please be aware that it may not be working properly in Internet Explorer, but who uses IE these days anyway ;)
Popularity is calculated as Count / Country Population * 10 million