简体   繁体   English

如何从命令行停止(postgres.app)postgres集群

[英]How do I stop (postgres.app) postgres cluster from command line

How do I stop a particular Postgres.app cluster without using the gui. 如何不使用gui停止特定的Postgres.app集群。

Instead of gui, I want to use bash/Terminal.app 我想使用bash / Terminal.app代替gui

通过gui停止

I should also point out that, Postgres app has a menu like this 我还应该指出,Postgres应用程序具有这样的菜单

在此处输入图片说明

So if I do a kill , would the menu show an incorrect state? 因此,如果我执行kill ,菜单会显示不正确的状态吗?

Can be done using pg_ctl 可以使用pg_ctl完成

pg_ctl stop -D <path to postgres data dir>

Example

pg_ctl stop -D ~/Postgres/pg96/data

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM