[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Starting Postgresql, OpenBSD 3.6



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