[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Starting Postgresql, OpenBSD 3.6
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Starting Postgresql, OpenBSD 3.6
- From: obsd_(_at_)_arcor_(_dot_)_de
- Date: Wed, 16 Feb 2005 19:27:40 +0100
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
Hi,
referring to the manual I use the following script in /etc/rc.local to
start Postgresql:
+-------------------------------------------------------------------
if [ -x /usr/local/bin/pg_ctl ]; then
su -l _postgresql -c "/usr/local/bin/pg_ctl start \
-D /var/postgresql/data -l /var/postgresql/logfile \
-o '-D /var/postgresql/data'"
echo -n ' postgresql'
fi
+-------------------------------------------------------------------
and to stop psql in /etc/rc.shutdown:
+-------------------------------------------------------------------
if [ -f /var/postgresql/data/postmaster.pid ]; then
su -l _postgresql -c "/usr/local/bin/pg_ctl stop \
-D /var/postgresql/data"
rm -f /var/postgresql/data/postmaster.pid
fi
+-------------------------------------------------------------------
but psql doesn't start correctly. Sometimes it starts and sometimes
it doesn't and I don't know why. Oddly enough, there is a PID in
/var/postgresql/data but the server seems to be killed because I
cannot connect.
Thanks in advance
L.
Visit your host, monkey.org