gpt4 book ai didi

postgresql - 这两个 postgreSQL 启动命令之间的区别?

转载 作者:行者123 更新时间:2023-11-29 11:44:26 25 4
gpt4 key购买 nike

第二次设置 psql 时,我遇到了一个指南,告诉我使用这一行来启动服务器:pg_ctl -D/usr/local/var/postgres start。在我被教导使用这一行之前:postgres -D/usr/local/var/postgres

我想知道两者之间有什么区别,是否有优势?

最佳答案

两种方法都可以。

Quote from the manual

Thus, the simplest way to start the server is:

$ postgres -D /usr/local/pgsql/data

[...]

$ postgres -D /usr/local/pgsql/data >logfile 2>&1 &

然而,进一步的手册还指出:

This shell syntax can get tedious quickly. Therefore the wrapper program pg_ctl is provided to simplify some tasks

所以这本质上是一个品味问题。

关于postgresql - 这两个 postgreSQL 启动命令之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50008107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com