LoginSignup
1
1

More than 5 years have passed since last update.

pg_restore の バージョン 9.6 を使いたい

Posted at

Heroku の dump file のフォーマットが変わって, 古い pg_restore の バージョンがサポートされなくなった。

If you are using an old version of pg_restore, you may see an error such as pg_restore: [archiver] unsupported version (1.13) in file header when you try to run pg_restore. Please make sure that you are using pg_restore version 10.3, 9.6.8, 9.5.12, 9.4.17, and 9.3.22 or up. You can check the version of your pg_restore by running pg_restore --version.

とのこと。

バージョンのチェックは以下の様にして行う。

$ pg_restore --version
pg_restore (PostgreSQL) 9.3.5

入れたつもりもないのに pg_restoreが使える PHPer の人は、 OSX 用の PHP のバイナリに付属しているものを使っているのかも知れない。

$ type pg_restore
pg_restore is hashed (/usr/local/php5/bin/pg_restore)

Mac で Postgresを使っている人で、 Postgres.app を導入している人は、 /Applications/Postgres.app/Contents/Versions/latest/bin/pg_restore を使うと良い。

$ /Applications/Postgres.app/Contents/Versions/latest/bin/pg_restore --version
pg_restore (PostgreSQL) 10.3

現時点最新の 2.1.3 バージョンで 上記のように 10.3 バージョンが利用可能

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1