PostgreSQL OpenSource Database

1.2 Starting and Stopping

1.1.1 PostgreSQL vs. MySQL [  up  ] - [ TOC ] - [ A - Z ] 2 Reference

start

(su - postgres)

VIA SOCKET:

# /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &

VIA PORT:

/usr/local/pgsql/bin/postmaster -i -p 5432 >/dev/null 2>&1 &

stop (as user postgres)

/usr/bin/pg_ctl stop -D $PGDATA -s -m fast

Out-of-the-box RedHat Style

If you'd like to run PostgreSQL via Socket, you had to add the -i argument within the start script.

Original

su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start >/dev/null 2>&1" </dev/null

Running via Socket

su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-i -p ${PGPORT}' start >/dev/null 2>&1" </dev/null




copyright by reto - created with mytexi
$Id: start-stop.html,v 1.38 2007/03/07 08:41:03 webcms Exp $