I installed posgresql from digitalocean and in the end of installation prints the below command in terminal
/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
I tried to run it with sudo root
user and also with switching to postgres
user but gives me below error
waiting for server to start..../bin/sh: 1: cannot create logfile: Permission denied stopped waiting pg_ctl: could not start server but when i check the status it says ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since Thu 2018-05-31 13:11:18 UTC; 56s ago Main PID: 3698 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 2362) CGroup: /system.slice/postgresql.service
May 31 13:11:18 staging systemd1: Starting PostgreSQL RDBMS... May 31 13:11:18 staging systemd1: Started PostgreSQL RDBMS.
Status is not running except is exited
.what the above command do and how can i run it ? I haven't faced it in previous versions