$ pg_ctl -D /usr/local/var/postgres start
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2020-05-25 09:30:06.260 JST [99188] FATAL: lock file "postmaster.pid" already exists
$ rm /usr/local/var/postgres/postmaster.pid
$ pg_ctl -D /usr/local/var/postgres start
waiting for server to start....2020-05-25 09:30:15.832 JST [99196] LOG: starting PostgreSQL 12.2 on x86_64-apple-darwin19.3.0, compiled by Apple clang version 11.0.0 (clang-1100.0.33.17), 64-bit
2020-05-25 09:30:15.833 JST [99196] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-05-25 09:30:15.833 JST [99196] LOG: listening on IPv6 address "::1", port 5432
2020-05-25 09:30:15.834 JST [99196] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2020-05-25 09:30:15.863 JST [99197] LOG: database system was interrupted; last known up at 2020-05-22 21:25:26 JST
2020-05-25 09:30:16.104 JST [99197] LOG: database system was not properly shut down; automatic recovery in progress
2020-05-25 09:30:16.108 JST [99197] LOG: redo starts at 0/2646DC0
2020-05-25 09:30:16.108 JST [99197] LOG: invalid record length at 0/2646EA8: wanted 24, got 0
2020-05-25 09:30:16.108 JST [99197] LOG: redo done at 0/2646E70
2020-05-25 09:30:16.119 JST [99196] LOG: database system is ready to accept connections
done
server started
これで動きました
参考記事
PG::ConnectionBad: could not connect to server: Connection refusedと怒られてからrails serverを立ち上げるまで
コメントを残す