问题原文
原帖链接 · Евгений Новиков · CC BY-SA 4.0
postgresql.service contents is
# systemd service for managing all PostgreSQL clusters on the system. This
# service is actually a systemd target, but we are using a service since
# targets cannot be reloaded.
[Unit]
Description=PostgreSQL RDBMS
[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=on
[Install]
WantedBy=multi-user.target
I tried to start PostrgeSQL by service postgresql start and was surprised by postgresql.service contents, because it starts /bin/true
uname -a output:
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
So my questions is: Why it happens, and how to fix it?
社区高分解答
原帖链接 · danblack · CC BY-SA 4.0
As indicated on the thread by @termcap, postgresql@{version}-main.service is the new service name.
So use systemctl {start|enable} [email omitted].
Sensibly the postgresql.service should contain a friendly migration warning rather than /bin/true (work it out yourself).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
