12 Jul 2014

A Life ... that just happens to have a name.


Zohra Sehgal (1912-2014)

Ae kafir, qadr ki qadr na ho to na sahi,
Ae nadaan, Umr ki fikr na ho to na sahi,
Gar ranjish ho is sadi se ya pichla koi,
To rukh kar, Ja ban ke dikha Zohra koi.

25 Apr 2013

PgAdmin doesn't (directly) support restoring from PLAIN format backups (yet)


Was working with my team at office recently and had a request from the team to learn how to 'Restore' an existing backup using PgAdmin. I thought this was easy, since PgAdmin allows for both 'Backup' and 'Restore' but investigating further, I found that PgAdmin only allows for Restore in formats other than 'PLAIN'.

Cross-checked this on the internet and found references here, here and here saying the same thing. 

PgAdmin doesn't (directly) support Restore'ing from plain text backups. To restore a backup, backed up using PLAIN format, you'd need to pass it through a command line utility called 'psql' that is available in both PgAdmin as well as postgres server installations.

I think it's high time that PgAdmin support this feature, especially when all the building blocks are already in-place. Lets see if I could take out time and submit a patch for this.

... till later.

27 Mar 2013

Christian Marriage Registration (Delhi, India)

(Please scroll down to the read the entire-post to know more)



Documents required for Christian Marriage Registration
(a.k.a. Documents required for Solemnization and Registration of Marriages under Indian Christian Marriage Act, 1872)

Workflow to get your Christian Marriage
Registered with the Delhi Government

28 Jan 2013

Setup Ubuntu for PostgreSQL Development (from tarball)

This very brief article is a primer for those wanting to start developing on PostgreSQL (on Ubuntu 12.10):

Getting Ubuntu ready for (PostgreSQL related) development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libreadline-dev
  • sudo apt-get install zlib1g-dev

Get Postgresql source

  • Download: http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2
  • tar -jxf postgresql-9.2.2.tar.bz2
  • ./configure
  • make
  • make install
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:
Happy Hacking :) ! 

6 Dec 2011

Setup Linux for PostgreSQL Development (from Git)

This very brief article is a primer for those wanting to start developing on PostgreSQL:

Getting your Linux (Ubuntu / CentOS) machine ready for (PostgreSQL related) development

Ubuntu: sudo apt-get install build-essential git libxml2-dev libxslt-dev autotools-dev automake libreadline-dev zlib1g-dev bison flex libssl-dev libpq-dev 

CentOS: sudo yum install git libxml2-devel libxslt-devel automake autoconf readline-devel zlib-devel bison flex gcc openssl-devel

Get Postgresql source (from Git)

  • git clone git://git.postgresql.org/git/postgresql.git
    • Would take some time (~1-15 minutes) but YMMV
  • ./configure --prefix=/opt/postgres/master --enable-depend --enable-cassert 
  • make -j4
  • sudo make install
  • cd contrib
  • make -j4
  • sudo make install
  • /opt/postgres/master/bin/initdb -D /opt/postgres/master/data
  • /opt/postgres/master/bin/pg_ctl -D /opt/postgres/master/data -l logfile start
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:

Happy Hacking :) ! 


git checkout REL9_6_STABLE && git pull && ./configure --prefix=/opt/postgres/96 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/96

git checkout REL_10_STABLE && git pull && ./configure --prefix=/opt/postgres/10 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/10

git checkout REL_11_STABLE && git pull && ./configure --prefix=/opt/postgres/11 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/11

git checkout REL_12_STABLE && git pull && ./configure --prefix=/opt/postgres/12 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/12

git checkout REL_13_STABLE && git pull && ./configure --prefix=/opt/postgres/13 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/13

git checkout REL_14_STABLE && git pull && ./configure --prefix=/opt/postgres/14 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/14

git checkout master && git pull && ./configure --prefix=/opt/postgres/master --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/master

Setup Ubuntu for PgAdmin Development (from Git)

This article is a primer for those wanting to start developing on PgAdmin on an Ubuntu 12.10.

Getting Ubuntu ready for development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libwxgtk2.8-dev
  • sudo apt-get install libssl-dev

Install PostgreSQL Database

  • Click here for detailed steps.

Get PgAdmin source

  • mkdir pgadmin
  • cd pgadmin/
  • git clone git://git.postgresql.org/git/pgadmin3.git
    • Would take some time (~10 minutes) but YMMV
  • cd pgadmin3/
  • bash bootstrap
  • ./configure
  • make
  • make install
These steps should give you a freshly compiled PgAdmin3 binary, customized for your system.

31 Dec 2006

Ubuntu is just too good !!!

Pending my previous post, I tried Ubuntu on my desktop system, and I am impressed :) !!

The reason ? Well I believe the most important reason is that 'It Just Works !!'.

Besides, on a macro scale, I found the following reasons as to why I am pretty impressed with Ubuntu:
  • There is only one application for each task. (for e.g. There is one music player, one video player, one browser, one email client. And all of them just work out of the box).
  • Things that shouldn't bother me, don't. (for e.g. I am never enquired about my IP address, gateway, workgroup name, dns server, mouse name, screen refresh rates, ... hufff, ... or the scores of things that linux distributions commonly ask)
  • It Just Works !!!

If you need to try a 'powerful' linux distribution, please try Ubuntu (version 6.10)

If browsing, email, songs and movies is all you do. You'd probably love it. And me a programmer, if I am beginning to really like, I think you can understand why you ought to try it out.

.
.
.

I did learn quite a few things along the way, and I'd be posting everything that I learnt in the upcoming posts.

... till later.

What's in an empty table?

How much storage does an empty table in Postgres take? This is a post about Postgres tables that store ... well basically ...  Nothing . The...