7
votes

im trying to restore a table from a backup file with pg_restore. However i get the error mentioned above. I read everywhere that an upgraded version of postgres is needed. I upgraded mine to 9.6.8-1 and then 10.3-1. Both did not work. Does anybody have a detailed procedure to fix this problem using a windows OS? Thanks in advance

1
Have you manage to solve the problem? I faced this with windows and ubuntu. On Ubuntu an update solved the problem but with windows...Viny Machado
No I haven't. I am also thinking about switching to ubuntu. Windows seems to have a lot of problems.mastersom
Finally solved this problem. What I did on Windows was: I uninstall Postgres and PgAdmin through CCleaner uninstall tool. After uninstalIed I removed all the relative entries and ran an registry cleaner. After this I also removed the folder on C:/Program Files/Postre... After this, I reboot and install all over again Postgre version 9.6. This solved the problem for me on Windows.Viny Machado
Having the same issue but run on a MacOS. Why is it always a f**ing hassle with DBs?Dirk Schumacher
pg_restore: [archiver] unsupported version (1.14) in file header trying to upload to Heroku from macOS. heroku pg:backups:restore 'myWebSite/upload/crores5.dump' DATABASE_URL --confirm heroku-site pg_restore --version --> pg_restore (PostgreSQL) 12.0 I've done this dozens of times in the past, but something changed as I upgraded from pg 9.5 to 12. I'm using the Postgres.app v2.3Greg

1 Answers

4
votes

Solved for me -

I had the same error restoring from PgAdmin4 on a computer with multiple Postgrsql versions installed. It was calling an older pg_restore version. In PgAdmin I changed the binary path in File/Preferences/Binary Path from $DIR/../runtime to C:\Program Files\PostgreSQL\10\bin and that fixed my issue. I suspect your having a similar issue at which you are unknowingly calling an older pg_restore version even though you updated postgresql.