我是 postgres 的新手,我通过下载 postgres 应用程序安装了它。然而,删除应用程序后我不得不重新安装几次,现在由于某种原因,当我尝试通过单击“开始”来执行 postgres 时,我得到:
There is already a PostgreSQL server running in this data directory
Run Code Online (Sandbox Code Playgroud)
所以,我现在其实不知道该怎么办。我已经搜索了如何完全删除 postgres,但由于我是通过下载 .dmg 文件进行安装的,所以我不知道除了删除应用程序文件夹中的应用程序并再次安装 dmg 文件之外还有什么要做。我找到了一些关于卸载 postgres 的说明,但它们都是关于使用brew和sudo命令,我认为这不适用于我的情况(因为我没有使用pip install或brew install进行安装)。
我已经通过执行此操作重新安装了几次,但仍然收到相同的消息,即 PostgreSQL 服务器已经在运行。我怎样才能解决这个问题?
我使用的是 Mac OS Sierra 10.12.2。
来自故障排除指南:\n https://postgresapp.com/documentation/troubleshooting.html
\n\n\n该数据目录中已经有一个 PostgreSQL 服务器正在运行
\n如果您\xe2\x80\x99 将 Postgres.app 配置为使用由不同 PostgreSQL 安装使用的数据目录,则可能会发生这种情况。\n在启动 Postgres.app 之前停止其他服务器。\n一般情况下,不建议只使用由另一个版本的 PostgreSQL 创建的数据目录,因为它的配置可能不同。
\n
如果您想知道如何停止正在运行的其他 postgres 服务器,Mac 顶部栏中应该有一个小图标:\n
如果存在,只需单击“退出”即可停止它。
\n此外,重新启动计算机通常会停止它。
\n否则,您可以尝试:
\n$ ps ux | grep Postgres\nscott 13272 0.0 0.0 2612628 304 ?? S 28Jan17 0:24.19 /Applications/Postgres.app/Contents/Versions/9.5/bin/postgres -D /Users/scott/Library/Application Support/Postgres/var-9.5 -p 5432\nscott 13268 0.0 0.1 2561100 10808 ?? S 28Jan17 0:10.94 /Applications/Postgres.app/Contents/MacOS/Postgres\nscott 75423 0.0 0.0 2434840 780 s011 S+ 9:44PM 0:00.00 grep Postgres\nRun Code Online (Sandbox Code Playgroud)\n对 pid(第二列,kill 13268此处)运行kill 应该会停止它。
| 归档时间: |
|
| 查看次数: |
5582 次 |
| 最近记录: |