ITの隊長のブログ

ITの隊長のブログです。Rubyを使って仕事しています。最近も色々やっているお(^ω^ = ^ω^)

pre-existing shared memory block (key 5432001, ID 65536) is still in use

スポンサードリンク

postgresqlが起動しないのでぐぐった

2018-06-13 18:35:21.338 JST [8583] FATAL:  pre-existing shared memory block (key 5432001, ID 65536) is still in use
2018-06-13 18:35:21.338 JST [8583] HINT:  If you're sure there are no old server processes still running, remove the shared memory block or just delete the file "postmaster.pid".

akd.air-nifty.com

なるほど。が、postmaster.pidがどこに存在しているかわからなかったので、findで探す

$ sudo find / -name postmaster.pid
Password:

# ...

/usr/local/var/postgres/postmaster.pid

見つけた。削除する

$ rm -rf /usr/local/var/postgres/postmaster.pid

# 起動する
$ pg_ctl -D /usr/local/var/postgres -l postgres.log start

起動した。わーい