Home > database >  For help, postgres9.5 cannot be started
For help, postgres9.5 cannot be started

Time:09-25

- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-
- A new session with the ID 19601 has had been created for the user root.
-
- The leading process of The session is 30336.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ systemd [1] : Started the Session of 19601 user root.
Subject: Unit session - 19601. The scope has finished the start - up
- Defined - By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
- the Unit session - 19601. The scope has finished starting up.
-
- The start - up result is done.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ systemd [1] : Starting the Session of 19601 user root.
Subject: Unit session - 19601. The scope has begun the start - up
- Defined - By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
- the Unit session - 19601. The scope has begun starting up.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ SSHD [30336] : pam_unix (SSHD: session) : the session the opened for user root by (uid=0)
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ polkitd [501] : Registered Authentication Agent for Unix - process: 30355-994346995 (the system bus name: 1.39250 [/usr/bin/pkttyagent - notify fd - 5 - fa
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ systemd [1] : Starting PostgreSQL database server 9.5...
Subject: Unit postgresql - 9.5. Service has begun the start - up
- Defined - By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
- the Unit postgresql - 9.5. Service has begun starting up.
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ pg_ctl [30367] : & lt; The 2018-11-09 16:08:31. 343 CST & gt; FATAL: could not create lock file "postmaster. Pid" : Permission denied
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ pg_ctl [30367] : pg_ctl: could not start server
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ pg_ctl [30367] : Examine the log output.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd [1] : postgresql - 9.5. Service: control the process exited, code=exited the status=1
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd [1] : Failed to start the PostgreSQL database server 9.5.
Subject: Unit postgresql - 9.5. The service from the failed
- Defined - By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
- the Unit postgresql - 9.5. Service has failed.
-
- The result is failed.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd [1] : Unit postgresql - 9.5. Service rose failed state.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd [1] : postgresql - 9.5. The service failed.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ polkitd [501] : Unregistered Authentication Agent for Unix - process: 30355-994346995 (the system bus name: 1.39250, object path/org/freedesktop/PolicyK

CodePudding user response:

Start to cut to the postgres user, it seems that you is under the root start!
Also check and postgres. Conf file configuration

CodePudding user response:

This database permissions more strict, want to use his own account to start on the Windows if it is a green version of the directory, also note to full access permissions can be,

CodePudding user response:

- A new session with the ID 19601 has had been created for the user root.
This is the wrong place, pg if not configured, root start will be an error, if you want to by root systemctl start, configuration file as follows:
Vim/usr/lib/systemd/system/postgresql - 11. Service
[Unit]
Description=11 PostgreSQL database server
Documentation=https://www.postgresql.org/docs/11/static/
After=syslog. Target
After=network. The target

[Service]
Type=notify
User=postgres
Group=postgres
Environment=PGDATA=https://bbs.csdn.net/data/pgdata/
OOMScoreAdjust=- 1000
The Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=https://bbs.csdn.net/topics/0
ExecStart=/home/postgres/PGSQL/bin/postmaster - D - 11 ${PGDATA}
ExecReload=/bin/kill HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0

[Install]
WantedBy=multi - user. Target

Then you can through the systemctl start postgresql - 11. Service start the service, pay attention to change the parameters in the document to the native environment
  • Related