Actually, I installed PostgreSQL 9.4 (with postGIS extension), and when installed, everything used to work fine.
As said on many tuts, I've set the /data folder, checked configuration files, and so on. Worked on other projects so I did not work on psql for a while But when installation was done, it used to work correctly, I made a test database, initialized postgres user, etc.
Now, I try to start psql (with "default" postgres user) and cannot connect! Start/stop/restart service do not change anything...
Result of "psql" command (with postgres user) :
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
When I check service status, I get this :
postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled) Active: active (exited) since tue 2016-05-24 09:24:13 CEST; 3s ago Process: 5658 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 5658 (code=exited, status=0/SUCCESS)
Starting/Stopping/Restarting service with command
sudo service postgresql start (or restart or stop)
Does not change anything to actual system behaviour..
DETAIL: Permissions should be u=rwx (0700). FATAL: data directory "/var/lib/postgresql/9.4/main" has group or world access