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:
https://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian

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:

Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on Reddit

Column to String Converter

dev01.yznotes.com/column2string/
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.

Selection_200

Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on Reddit

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: http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html

 

Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on Reddit

Interactive Data Analysis Setup on AWS

yznotes.com_aws_setup_for_data_analysis


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)

 

Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on Reddit

Playing with Google Charts – Simple Visualization of Geographical Data


Selection_151
Visit dev01.yznotes.com/gcharts_01 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

 

Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on Reddit