which will leave the server running in the foreground. This must be
done while logged into the
PostgreSQL user
account. Without , the server will try to use
- the data directory in the environment variable PGDATA.
- If neither of these succeed, it will fail.
+ the data directory named by the environment variable PGDATA.
+ If that variable is not provided either, it will fail.
- To start the postmaster in the
- background, use the usual shell syntax:
+ Normally it is better to start the postmaster in the
+ background. For this, use the usual shell syntax:
$ postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
- It is an important to store the server's stdout> and
+ It is important to store the server's stdout> and
stderr> output somewhere, as shown above. It will help
for auditing purposes and to diagnose problems. (See
linkend="logfile-maintenance"> for a more thorough discussion of log
Normally, you will want to start the database server when the
computer boots.
booting>starting
- the server during>> Autostart scripts are operating
- system-specific. There are a few distributed with
+ the server during>> Autostart scripts are operating-system-specific.
+ There are a few distributed with
- contrib/start-scripts> directory. This may require root
- privileges.
+ contrib/start-scripts> directory. Installing one will require
+ root privileges.
- Here are a few more operating system specific suggestions. (Always
- replace these with the proper installation directory and the user
- name.)
+ Here are a few more operating-system-specific suggestions. (In each
+ case be sure to use the proper installation directory and user
+ name where we show generic values.)