Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. # Update PostgreSQL
  2.  
  3. This document briefly describes how to upgrade PostgreSQL from 9.4.5 to 9.5 and assumes the installation was done with Homebrew
  4. . (Upgrades between other versions should be similar)
  5.  
  6.  
  7. ## Stop the server
  8.  
  9. pg_ctl stop -w -D /usr/local/var/postgres
  10.  
  11. ## Upgrade with homebrew
  12.  
  13. brew upgrade postgresql
  14.  
  15. ## Initialize a new 9.5 database
  16.  
  17. initdb /usr/local/var/postgres9.5 -E utf8
  18.  
  19. ## Run pg_upgrade
  20.  
  21. pg_upgrade -v \
  22. -d /usr/local/var/postgres \
  23. -D /usr/local/var/postgres9.5 \
  24. -b /usr/local/Cellar/postgresql/9.4.5/bin/ \
  25. -B /usr/local/Cellar/postgresql/9.5.0/bin/
  26.  
  27.  
  28. ## Move new data into place
  29.  
  30. cd /usr/local/var
  31. mv postgres postgres9.4
  32. mv postgres9.5 postgres
  33.  
  34. ## Restart the server
  35.  
  36. pg_ctl start -D /usr/local/var/postgres -w -l /usr/local/var/postgres/postgres-server.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement