Created attachment 41 [details] New init file I modified the init script to support multiple daemons on the same machine. For me, it is necessary because I have 2 databases on the same cluster, each one using a different set, replicating. How to use: * copy or link /etc/init.d/slon to /etc/init.d/slon-new (choose your name). * create a file /etc/sysconfig/slon-new (match above name) with at least this variables: SLONCONF=/etc/slon-new.conf SLONPID=/var/run/slon-new.pid SLONLOG=/var/log/slony-new That's it. I tested it on CentOS.
Can you include the output of 'diff' comparing your version against the version of the slony script that you based your changes on (ideally the head of REL_2_0_STABLE from cvs?)
Created attachment 42 [details] diff -Nur file Here.
This did not work for me. pkill kills slon daemons, however slon_watchdog restarts slons in a few seconds. Why don't you call slon_kill there? Regards, Devrim
Hi Devrim. I've compiled against a CentOS 5.5 and Postgresql 8.4.3 and using the specfile When I run 'pgrep -f "slon -f /etc/slon.conf"' the command returns 2 processes, but with the same name. For me its the opposite: slon_kill didn't work.
(In reply to comment #4) > For me its the opposite: slon_kill didn't work. Why? Regards, Devrim
Hi Devrim. The output is: --- slon_kill.pl... Killing all slon and slon_watchdog instances for the cluster replication 1. Kill slon watchdogs No watchdogs found 2. Kill slon processes No slon processes found --- Inside the script: line 44: egrep found nothing, since I don't have any process called slon_watchdog line 56: egrep found nothing, since I don't have any process that match '[s]lon .*$CLUSTER_NAME' I've tested using the cvs HEAD and 2.0.STABLE Again, both processes have the same name: [root@Centosx64 ~]# ps -fu postgres UID PID PPID C STIME TTY TIME CMD postgres 19747 1 0 14:01 ? 00:00:00 /usr/bin/slon -f /etc/slon.conf postgres 19749 19747 0 14:01 ? 00:00:00 /usr/bin/slon -f /etc/slon.conf
Created attachment 43 [details] diff -Nur file using pidfile Hi Devrim. I rewrote the init to use pidfile. I've changed some lines from spec, to solve permission issues. Jose Arthur.
I have applied this to a "bug125" branch on GitHub. It looks plausible, but not having much Red Hat around, I can't really validate the legitimacy. See: http://github.com/cbbrowne/slony1-engine/commit/c030014cf25aa5be83da987ab8bfc5e71d36a6be I'll be happy to apply this to 2.0 and HEAD, if Devrim gives his OK. Or if Devrim wants to apply it, that's good too.
(In reply to comment #8) > I have applied this to a "bug125" branch on GitHub. It looks plausible, but > not having much Red Hat around, I can't really validate the legitimacy. > > See: > > http://github.com/cbbrowne/slony1-engine/commit/c030014cf25aa5be83da987ab8bfc5e71d36a6be > > I'll be happy to apply this to 2.0 and HEAD, if Devrim gives his OK. > > Or if Devrim wants to apply it, that's good too. IMHO none of the init scripts will actually work unless we have a slon_ctl script (that I submitted before, which still needs some work). I'm on holiday now. I will return next weekend, and will look at this after then. Regards, Devrim
Devrim, what is the status of this script + your slon_ctl script. I would think the target branch for both of them would be 2.1 since I don't think we want to change how init scripts work in 2.0 Is there a git branch floating around with this script + your slon_ctl script?
(In reply to comment #10) > what is the status of this script + your slon_ctl script. I committed current version here: http://projects.gunduz.org/browser/slony1/slon_ctl/slon_ctl.pl or to get directly: http://projects.gunduz.org/repo/slony1/slon_ctl/slon_ctl.pl > I would think the target branch for both of them would be 2.1 since I don't > think we want to change how init scripts work in 2.0 Ok. Regards, Devrim