初めまして、Ruby初学者です。
現在データベースの学習を行っており、MacにpostgreSQLをインストールし、起動を試みたところ以下のようなエラーが起こってしまいました。
ご教授頂けますと幸いです。
$postgres 2019-02-09 20:10:53.860 JST [787] FATAL: database files are incompatible with server 2019-02-09 20:10:53.860 JST [787] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
以下、試したコマンド
$ postgres -D /usr/local/var/postgres 2019-02-09 20:08:00.092 JST [728] FATAL: database files are incompatible with server 2019-02-09 20:08:00.092 JST [728] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
postgreSQLを起動させようとしても同様のエラーが起こってしまいました。
$ postgres --version postgres (PostgreSQL) 11.1
https://github.com/Homebrew/legacy-homebrew/issues/21920
この記事を参考にパスを通しても同様なエラーです。
export PGDATA=/usr/local/var/postgres
$ postgres -D /usr/local/var/postgres 2019-02-09 20:14:15.682 JST [863] FATAL: database files are incompatible with server 2019-02-09 20:14:15.682 JST [863] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
よろしくお願い致します。
【参考にした記事】
https://qiita.com/gooddoog/items/1f986c1a6c0f253bd4e2
エラーメッセージによりますと PostgreSQLのv10 のデータがありますが、このPostgreSQLはv11でそのままでは利用できません、となっています。
これをどのようにしたいのかを明確にすると回答が得られると思います。
1: 旧データをPostgreSQLv11で使用したい(マイグレーション)
2: 旧データを削除してPostgreSQLv11を使用したい (旧データ削除)
3: 旧データをPostgreSQLv10で使用したい(PostgreSQLv10の再インストール)
回答1件
あなたの回答
tips
プレビュー