mac启动pg数据库失败 “Is another postmaster (PID 370) running in data directory“

解决办法:

  1. 进入目录 /usr/local/var/postgres
  2. 删除文件: postmaster.pid
  3. 启动pg命令: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
图片参考:

在这里插入图片描述