Title: How do I upgrade postgresl database? Incompatibility error
Tags: linux;postgresql;upgrade
Question: I installed postgresql via Homebrew.

I have the following issue after upgrading:

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

Any tips on how to upgrade? I tried the following:

```$ pg_upgrade -d /usr/local/var/postgres/ -D /usr/local/var/postgres -b 
/usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin
```

It didn't work. Here's the output.

```Performing Consistency Checks
Checking current, bin, and data directories                 ok
Checking cluster versions                                   
This utility can only upgrade to PostgreSQL version 9.1.
Failure, exiting
```

error.




{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2011:00:12/20/11', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<linux><postgresql><upgrade>', 'Title': 'How do I upgrade postgresl database? Incompatibility error', 'ViewCount': 673, 'id': 8569461, 'user_AboutMe': None, 'user_AccountId': 64807.0, 'user_DisplayName': 'Daniel Fischer', 'user_Reputation': 3032.0, 'user_Views': 375.0, 'user_id': 191125.0}}