Skip to content

Instantly share code, notes, and snippets.

@ivanvanderbyl
Created December 6, 2012 06:55
Show Gist options
  • Save ivanvanderbyl/4222308 to your computer and use it in GitHub Desktop.
Save ivanvanderbyl/4222308 to your computer and use it in GitHub Desktop.

Revisions

  1. ivanvanderbyl revised this gist Dec 6, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    service postgresql stop
    /usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

    logout
    logout # logout postgresql back to previous user

    sudo apt-get remove postgresql-9.1
    sudo vim /etc/postgresql/9.2/main/postgresql.conf # change port to 5432
  2. ivanvanderbyl revised this gist Dec 6, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    service postgresql stop
    /usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

    ctrl+c
    logout

    sudo apt-get remove postgresql-9.1
    sudo vim /etc/postgresql/9.2/main/postgresql.conf # change port to 5432
  3. ivanvanderbyl revised this gist Dec 6, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,13 @@ sudo apt-get update
    sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2

    sudo su -l postgres
    psql -d template1 -d 5433
    psql -d template1 -p 5433
    CREATE EXTENSION IF NOT EXISTS hstore;
    CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    service postgresql stop
    /usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

    \d
    ctrl+c

    sudo apt-get remove postgresql-9.1
    sudo vim /etc/postgresql/9.2/main/postgresql.conf # change port to 5432
  4. ivanvanderbyl created this gist Dec 6, 2012.
    16 changes: 16 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    sudo add-apt-repository ppa:pitti/postgresql
    sudo apt-get update
    sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2

    sudo su -l postgres
    psql -d template1 -d 5433
    CREATE EXTENSION IF NOT EXISTS hstore;
    CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    service postgresql stop
    /usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

    \d

    sudo apt-get remove postgresql-9.1
    sudo vim /etc/postgresql/9.2/main/postgresql.conf # change port to 5432
    sudo service postgresql restart