有人能详细解释一下postgresql服务是如何在Ubuntu16.04上工作的吗?导致我问这个问题的行为如下。我使用命令sudo systemctl start postgresql启动postgresql服务。当我运行systemctl list-units | grep post时我看到
UNIT LOAD ACTIVE SUB DESCRIPTION
postgresql.service loaded active exited PostgreSQL RDBMS
postgresql@9.6-main.service loaded active running PostgreSQL Cluster 9.6-main
system-postgresql.slice loaded active active system-postgresql.slice当我运行sudo systemctl stop postgresql时,postgresql.service和postgresql@9.6-main.service都消失了。这三个服务中的每一个都在做什么?
发布于 2017-12-14 11:03:20
我假设postgresql@9.6-main.service是PostgreSQL Cluster 9.6-main集群的注册服务。这是一个实际控制postgres在您的系统。
我猜postgresql.service 这里的影响是
我猜system-postgresql.slice 是postgres切片单元
以上都不是运行postgres的关键。您可以只使用pg_ctl启动/停止cluser,而无需在服务中注册它。但是,如果您想知道在您的情况下运行哪个服务,那么它就是postgresql@9.6-main.service。
https://stackoverflow.com/questions/47797860
复制相似问题