私のマシンでpostgres
を使用しようとしていて、しばらく前にbrew install postgres
を実行してError: postgresql-9.4.5_2 already installed
を実行した後にデータベースソフトウェアをインストールしたことに気付きました。そこから私は、バックグラウンドでのpostgresを実行することと、正常に起動するhomebrew/services
をインストールすることにしました。しかしPostgres - 自家製インストールでサーバファイルが見つかりません複数のバージョン
brew services start postgresql==> Successfully started
のpostgresql (label: homebrew.mxcl.postgresql)
でバックグラウンドジョブを閉じて、私はpostgres
を実行したときに、私はのエラー受信:
LOG: skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.5.
:私はSOの答えを踏襲すると
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
は、cat /usr/local/var/postgres/server.log
は、私は次のエラーを受け取りました
私はPostgreSQLの古いバージョンをインストールして、削除する必要があると思います。
私はその後psql
を試してみましたが、受け取っ:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
そして最後には、元のメッセージ次およびenv varibleの設定をもたらした、initdb /usr/local/var/postgres
で新しいDBを初期化するが、それはそれを修正していないことを決めました。 export PGDATA=/usr/local/var/postgres
。再びpostgres
を試みた後、私はこれが私に語ったことは、私はpostgresサーバを起動するために解決する必要がバージョンの互換性の問題は、明らかにあるということですが、私はどのようなファイルのパスはよく分からない
LOG: skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.5.
を受け取りますそれをクリアするための適切な方法が必要です。誰かが何かガイダンスを提供できますか?