Postgresql无法启动

Postgresql无法启动
i have restarted my local ubuntu 18.4 server and postgresql 10 is not running now kindly help

trying start by : `sudo systemctl start postgresql@10-main`
Receiving  following errors.

    Starting PostgreSQL Cluster 10-main...

    Error:   start -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-10-main.
    Can't exec "": No such file or directory at /usr/bin/pg_ctlcluster line 211.

    Error: could not exec   start -D /var/lib/postgresql/10/main -l /var/log/postgresql/post

    [email protected]: Can't open PID file /var/run/postgresql/10-main.pid (yet?) after start: No 

    [email protected]: Failed with result 'protocol'.
    Failed to start PostgreSQL Cluster 10-main.


`apt-cache show postgresql`:

    Package: postgresql
    Architecture: all
    Version: 10+190
    Priority: optional
    Section: database
    Source: postgresql-common (190)
    Origin: Ubuntu
    Maintainer: Ubuntu Developers <[email protected]>
    Original-Maintainer: Debian PostgreSQL Maintainers <[email protected]>
    Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    Installed-Size: 62
    Depends: postgresql-10
    Suggests: postgresql-doc
    Filename: pool/main/p/postgresql-common/postgresql_10+190_all.deb
    Size: 5784
    MD5sum: 2fb6f13d95e354c47a1df602f68f7131
    SHA1: 45e8e55044259941faba82282243f11194baf66c
    SHA256: 02baa3ea401deb634a4307a8d0e25378613ffbf3b3ddbda9cc03d5277a5ea7a4
    Description-en: object-relational SQL database (supported version)
     This metapackage always depends on the currently supported PostgreSQL
     database server version.
////////// systemctl restart postgresql.service  /////////////////

~$ systemctl restart postgresql.service
~$ systemctl status  postgresql.service
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2019-09-25 11:03:27 PKT; 19s ago
  Process: 7038 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 7038 (code=exited, status=0/SUCCESS)

 Starting PostgreSQL RDBMS...
 Started PostgreSQL RDBMS.

答案1

我不确定你想用 postgres 做什么,最好将整个背景信息更新到你的问题中,你想做什么?你尝试过什么?你遵循了哪些指南(如果有)?

我不确定你为什么要开始,postgres@10-main也不确定我知道那是什么。但只需运行

要启动服务:

systemctl restart postgresql.service 

每次启动时启动服务

systemctl reenable postgresql.service


根据您最近的帖子更新,postgres 已启动并正在运行。

相关内容