Your options range from doing something simple to something complex.

A simple option on a Linux server would be placing a command like this in
/etc/rc/rc.local:

su - postgres -C "/usr/local/pgsql/bin/pg_ctl -D ;/usr/local/pgsql/data -l
/usr/local/pgsql/logfile start"

However, that might not be the optimal choice for every situation, because
it doesn't take into account WHY the system rebooted.  A system that
rebooted because of a power/UPS issue might need to be treated differently
than one that rebooted because of a hardware failure or kernel panic.  (And
just because postgres can restart the database, that doesn't always mean it
should.  Even a well-written startup script might not know enough to make
that decision for you.)

This might be good material for a tutorial on the wiki site, with some
system-specific sections.
--
Mike Nolan

Reply via email to