【PostgreSQL】postmaster.pidがありませんの対処方法

PostgreSQLその他

postmaster.pidがありませんの対処方法

pg_ctlの実行時に、「postmaster.pidがありません サーバーが動作していますか?」

と表示された時の対処方法です。

 

現象:pg_ctlのstart、stopをすると上記のエラーが表示される。

結論:pg_ctlのrestartをし直せばうまくいきました。

-- pg_ctlのrestart構文
pg_ctl -D "dataフォルダまでのパス" restart

-- 実行例
pg_ctl -D "C:\Program Files\PostgreSQL\data" restart