title: How to upgrade PostgreSQL from version 9.6 to version 10.1 without losing data?
body: <p>I'm using the PostgreSQL database for my Ruby on Rails application (on Mac OS X 10.9).</p>
  
  <p>Are there any detailed instructions on how to upgrade PostgreSQL database?</p>
  
  <p>I'm afraid I will destroy the data in the database or mess it up.</p>