[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Starting Postgresql, OpenBSD 3.6
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Starting Postgresql, OpenBSD 3.6
- From: Marco Pfatschbacher <mpf_(_at_)_mailq_(_dot_)_de>
- Date: Thu, 17 Feb 2005 10:32:51 +0100
Hi,
the problem comes due to a race between the point where
psql registers its SIGHUP handler, and the SIGHUP which is
being sent, when /etc/rc finishes.
A simple solution is to block the HUP signal.
> +-------------------------------------------------------------------
> if [ -x /usr/local/bin/pg_ctl ]; then
> su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start \
^^^^^
> -D /var/postgresql/data -l /var/postgresql/logfile \
> -o '-D /var/postgresql/data'"
> echo -n ' postgresql'
> fi
> +-------------------------------------------------------------------
This hack could be avoided, if postgresql would use a proper way of
daemonizing itself. But they have choosen to write their logfiles
to stdout...
Marco
Visit your host, monkey.org