Title: How restore a Heroku PG database on a MAC
Tags: postgresql;heroku
Question: I created a .dump on Heroku and dowloaded it.
Using pgAdmin4, I created a new table and tried to restore using the Heroku downloaded dump file.
I get the message "pg_restore:[archiver] unsupported version (1.13) in file header.
My pg_restore version is 9.1.13
Comment: It sounds like you've successfully upgraded Postgres, but there's another step to actually upgrade the database: `brew postgresql-upgrade-database`. Note that you should back up your local databases before running that command if you have critical data on them. I also recommend reading this post: https://stackoverflow.com/questions/49064209/getting-archiver-unsupported-version-1-13-in-file-header-when-running-pg-r

Comment: I also installed PG on a new MAC using HomeBrew.  It installed v 10.3.  I then tried to restore the Heroku db and got the same message.

Comment: How do I get the CVE-2018-1058 patch installed? Will that fix it?

Comment: I used the brew command and got: Error: postgresql data already upgraded!

Here is the accepted answer: I found out that pgAdmin4 uses it's own old copy of pg_restore in the application contents.  I used my system pg_restore on the command line and it worked.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2018:00:03/25/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<postgresql><heroku>', 'Title': 'How restore a Heroku PG database on a MAC', 'ViewCount': 504, 'id': 49477196, 'user_AboutMe': '<p>Worked at Dow, Microsoft and IBM.\nNow working with sons on web development.\nLearning Ruby on Rails.</p>\n', 'user_AccountId': 1068571.0, 'user_DisplayName': 'Reddirt', 'user_Reputation': 5843.0, 'user_Views': 823.0, 'user_id': 1068420.0}}