From: Pavan D. <pav...@gm...> - 2014-07-18 06:26:30
|
Hello, I think its a bad idea to use killall to terminate existing processes. I noticed this for GTM, but the same may apply to other kinds of processes too. In my case, I was setting up GTM master and standby on the same machine. pgxc_ctl was failing to start up GTM correctly. Upon investigation, I figured out that while initialising/starting GTM slave, it first kills any existing GTM processes using "killall gtm". This kills the GTM master as well. There are several issues with using killall 1. It may kill unrelated processes e.g. I'd a vim session on gtm_cmd.c and it got killed too 2. It may kill processes belonging to another instance, if user is running multiple database clusters on the same machine 3. killall -9 It doesn't do a clean shutdown which may cause issues I wonder why can't we just rely on -m immediate? If the process fails to respond to that, either we have a bug to fix or worst administrator can manually kill the processes he wants. Even if we have to use kill command, can we not read PID from the .pid file and send signal to that particular process only? Thanks, Pavan -- Pavan Deolasee http://www.linkedin.com/in/pavandeolasee |