Wednesday 10 October 2012

parse tweets

migrating to (PostgreSQL) 9.2.1


From logs

DETAIL:  The data directory was initialized by PostgreSQL version 9.1, which is not compatible with this version 9.2.1.
FATAL:  database files are incompatible with server



#1. Stop the server
 launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

#2. Move old files
 mv /usr/local/var/postgres /usr/local/var/postgres.old

#3.Create a new dir
 initdb /usr/local/var/postgres

# DONE
# Success. You can now start the database server using:
# postgres -D /usr/local/var/postgres
# or
# pg_ctl -D /usr/local/var/postgres -l logfile start

#4.Upgrade all db
pg_upgrade -d /usr/local/var/postgres.old/ -D /usr/local/var/postgres -b /usr/local/Cellar/postgresql/9.1/bin -B /usr/local/Cellar/postgresql/9.2.1/bin

Fix iphone autocomplete - autocorrect -autocapitalize