Wednesday, July 8, 2015

How to fix "nickname is already in use" error in irc?

What causes IRC to throw "nickname is already in use":
1.  You are not closed your previous session of IRC chat
     a) Trying to login with same nickname in another place/application with 
          existing active connection.
2.  You are internet connectivity disconnected & IRC server not released 
      your session.

How to fix:
a) /msg nickserv ghost <your_nickname> <password>
b) /msg nickserv <your_nickname>
b) /msg NickServ identify <password>

Tuesday, July 7, 2015

Migrate Postgresql 9.1 to 9.4 in 4 steps

Postgresql elephant
By Jeff MacDonald [BSD], via Wikimedia Commons


$pg_lsclusters - Shows the currently running (online/down) postgres DB

$sudo pg_ctlcluster 9.1 main stop - Stops the running postgres 9.1

$sudo pg_upgradecluster 9.1 main - Upgrades(migrates) postgres to newer version(upgrade time depends on the amount of data).

Check whether the upgrade went fine and the newer version of postgres works fine by
$su postgres
postgres@xyz:/$ psql
psql (9.4.3)                       Now postgresql upgraded to new version
Type "help" for help.
postgres=#\l                     -   Check all your databases are available or not
postgres=#\c <your_database_name>  - Connects to your database
postgres=#select * from <your_table_name> - Check the content is same.

Optional:
$sudo pg_dropcluster 9.1 main  -  Do this only, If you really want to drop your old postgres cluster.