Skip to content

Instantly share code, notes, and snippets.

@larsar
Forked from cloud8421/postgres_upgrade
Created March 25, 2014 18:40

Revisions

  1. @cloud8421 cloud8421 revised this gist Sep 23, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion postgres_upgrade
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@ Steps to install and run PostgreSQL 9.3 using Homebrew (Mac OS X)
    mv /usr/local/var/postgres /usr/local/var/postgres92
    brew upgrade postgresql
    initdb /usr/local/var/postgres -E utf8
    pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin -B /usr/local/Cellar/postgresql/9.3.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin -B /usr/local/Cellar/postgresql/9.3.0/bin -d /usr/local/var/postgres92 -D /usr/local/var/postgres
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  2. @EdwardTippett EdwardTippett revised this gist Sep 21, 2013. 2 changed files with 9 additions and 10 deletions.
    10 changes: 0 additions & 10 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,10 +0,0 @@
    Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
    (if you aren't using version 9.1.5, change line 6 with the correct version)

    1. pg_ctl -D /usr/local/var/postgres stop -s -m fast
    2. mv /usr/local/var/postgres /usr/local/var/postgres91
    3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb
    4. brew upgrade postgresql
    5. initdb /usr/local/var/postgres -E utf8
    6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
    9 changes: 9 additions & 0 deletions postgres_upgrade
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    Steps to install and run PostgreSQL 9.3 using Homebrew (Mac OS X)
    (if you aren't using version 9.2.4, change to the correct version)

    launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    mv /usr/local/var/postgres /usr/local/var/postgres92
    brew upgrade postgresql
    initdb /usr/local/var/postgres -E utf8
    pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin -B /usr/local/Cellar/postgresql/9.3.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  3. @rafaelss rafaelss created this gist Sep 11, 2012.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
    (if you aren't using version 9.1.5, change line 6 with the correct version)

    1. pg_ctl -D /usr/local/var/postgres stop -s -m fast
    2. mv /usr/local/var/postgres /usr/local/var/postgres91
    3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb
    4. brew upgrade postgresql
    5. initdb /usr/local/var/postgres -E utf8
    6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
    7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start