Ian Burrell ianburrell
Mon Aug 1 23:59:52 PDT 2005
Hey all,

I decided the simplest way to start./stop slon daemons is to have a
single daemon which starts and monitors the slon daemons for an entire
cluster.  It doesn't do all the monitoring which slon_watchdog2 does. 
It also daemonizes itself, writes to a log file, and writes a pid
file.

Instead of grepping ps output to find the processes, I modified
start_slon function to do a fork and exec to start the slon process. 
This allows it to return the pid of the child process.  The daemon can
then wait() for the child processes to exit and restart them when they
do.

I have attached the patch to add the tools/altperl/slon_cluster.pl script.

 - Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slon_cluster.diff
Type: text/x-patch
Size: 7517 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050801/3852cd0b/slon_cluster.bin


More information about the Slony1-general mailing list