LoginSignup
3
1

More than 5 years have passed since last update.

pg_restore: [archiver] unsupported version (1.13) in file header への対応

Posted at

問題

pg_restore: [archiver] unsupported version (1.13) in file header

Debian stretch 上で Heroku から取得したデータを pg_restore でリストアしようとしたところ発生した。

原因

対応方法(失敗)

クライアント側の PostgreSQL のバージョンをあげる必要がある。

しかしながら Debian のパッケージでは現在(2018/3/16)のところ9.6.7までしか配布していないためapt-get upgradeでは対応できない。

対応方法

PostgreSQL をパッケージ一覧に追加することで10.3をインストールして対応した。

apt-get remove postgresql
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
apt-get update
apt-get install postgresql postgresql-contrib
3
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
3
1