title: postgresql could not properly start exited with active (exited)
body: <p>I installed posgresql from <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04" rel="nofollow noreferrer">digitalocean</a> and in the end of installation prints the below command in terminal</p>
  
  <pre><code>/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
  </code></pre>
  
  <p>I tried to run it with <code>sudo root</code> user and also with switching to <code>postgres</code> user but gives me below error </p>
  
  <blockquote>
    <p>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</p>
    
    <p>May 31 13:11:18 staging systemd<a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04" rel="nofollow noreferrer">1</a>: Starting PostgreSQL RDBMS... May
    31 13:11:18 staging systemd<a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04" rel="nofollow noreferrer">1</a>: Started PostgreSQL RDBMS.</p>
  </blockquote>
  
  <p>Status is not running except is <code>exited</code>.what the above command do and how can i run it ? I haven't faced it in previous versions</p>