Starting, Logging In to, and Stopping PostgreSQL
- Start the database.
- Switch to user postgres.
su - postgres
- Start the database.
/usr/local/pgsql/bin/pg_ctl -D /data/pgsql/data/ -l logfile start

- Check whether the database process is started. If the following information is displayed, the database process is started successfully.
- Log in to the database.
- Switch to user postgres.
su - postgres
- Log in to the database.
/usr/local/pgsql/bin/psql -U postgres

- Stop the database.
- Switch to user postgres.
su - postgres
- Stop the database.
/usr/local/pgsql/bin/pg_ctl -D /data/pgsql/data/ -l logfile stop

- Switch to user postgres.
Parent topic: Deploying PostgreSQL
