0 like 0 dislike
3.2k views
asked by (1.3k points)  
edited by

Hello anyone can help me, please? I've upgraded my PostgreSQL on version 10, and actually I have some issues in incompatibility with other local applications. Consequently, I've downgraded to the old version 9.5. So now, I cannot online the 9.5. It's always down, and the error is related to

PID file /var/run/postgresql/9.5-main.pid not readable (yet?) after start: No such file or directory

 after launching systemctl status postgresql@9.5-main.service. Any suggestion? Thank you.

I upgraded and downgraded Following Steps:

I've just reinstalled my PosgreSQL after getting a problem. Actually, it gives me the new version (10). However, some of my local applications is not compatible with the version 10; so I would like to delete it. That means, I didn't use any specific commande to upgrade or downgrade it. Now, I cannot start the service 

(sudo pg_ctlcluster 9.5 main start : Job for postgresql@9.5-main.service failed because a configured resource limit was exceeded. See "systemctl status postgresql@9.5-main.service" and "journalctl -xe" for details.). 
(systemctl status postgresql@9.5-main.service : postgresql@9.5-main.service - PostgreSQL Cluster 9.5-main
Loaded: loaded (/lib/systemd/system/postgresql@.service; disabled; vendor preset: enabled)
Active: failed (Result: resources) since ven 2018-05-18 10:31:24 EAT; 2min 45s ago
Process: 6005 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect %i start (code=exited, status=1/FAILURE)

mai 18 10:30:53 PC-Stagiaire systemd[1]: Starting PostgreSQL Cluster 9.5-main...
mai 18 10:30:53 PC-Stagiaire postgresql@9.5-main[6005]: Removed stale pid file.
mai 18 10:30:53 PC-Stagiaire postgresql@9.5-main[6005]: Use of uninitialized value in subroutine entry at /usr/bin/pg_ctlcluster line 209.
mai 18 10:30:53 PC-Stagiaire postgresql@9.5-main[6005]: Use of uninitialized value in subroutine entry at /usr/bin/pg_ctlcluster line 210.
mai 18 10:31:24 PC-Stagiaire postgresql@9.5-main[6005]: The PostgreSQL server failed to start. Please check the log output.
mai 18 10:31:24 PC-Stagiaire systemd[1]: postgresql@9.5-main.service: PID file /var/run/postgresql/9.5-main.pid not readable (yet?) after start: No such file or directory
mai 18 10:31:24 PC-Stagiaire systemd[1]: Failed to start PostgreSQL Cluster 9.5-main.
mai 18 10:31:24 PC-Stagiaire systemd[1]: postgresql@9.5-main.service: Unit entered failed state.
mai 18 10:31:24 PC-Stagiaire systemd[1]: postgresql@9.5-main.service: Failed with result 'resources'.
)

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
answered by (1.3k points)  

may be data directory wrong ownership change the owner to postgres then restart again

--as root user:
chown postgres:postgres /var/lib/postgresql/9.5/main

--then come to postgres user restart the postgres server:
pg_ctl -D /var/lib/postgresql/9.5/main restart

 

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
0 answers
...