PostgreSQL version : 11.2 OS : RHEL 7.5
I am new to PostgreSQL. I would like to know which is the ideal way to start 'Database server' . In Oracle world, we call this starting the instance.
Should I be using Option A or Option B ?
Option A. As root user , run
# systemctl start postgresql-11
Option B. As postgres user, run
$ postgres -D /var/lib/pgsql/11/data
NB: For Option B, PostgreSQL 11's official doc mentions a different directory (/usr/local/pgsql/data) as shown below . Maybe the doc not updated.
$ postgres -D /usr/local/pgsql/data