Thu Aug 5 08:55:43 PDT 2010
- Previous message: [PATCH 3/3] If the nodelock can not be obtained then the worker will keep retrying instead of exiting. Bug # 132 discussses issues where slon can't restart because of a duplicate node lock. The watchdog instance of slon can kill the worker child and restart it. The issue is that postgresql backend for the old worker might still be around when the new worker tries to get the nodelock.
- Next message: [Slony1-patches] bug 139 + bug 132
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This can be considered part of bug 139 (non async safe functions being called by a signal handler) --- src/slon/slon.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/slon/slon.c b/src/slon/slon.c index 36eaf4a..837d709 100644 --- a/src/slon/slon.c +++ b/src/slon/slon.c @@ -793,7 +793,17 @@ SlonWatchdog(void) #endif slon_log(SLON_INFO, "slon: watchdog process started\n"); - /* + + + slon_log(SLON_CONFIG, "slon: watchdog ready - pid = %d\n", slon_watchdog_pid); + + slon_worker_pid = fork(); + if (slon_worker_pid == 0) + { + SlonMain(); + exit(-1); + } + /* * Install signal handlers */ #ifndef CYGWIN @@ -841,15 +851,6 @@ SlonWatchdog(void) slon_exit(-1); } - slon_log(SLON_CONFIG, "slon: watchdog ready - pid = %d\n", slon_watchdog_pid); - - slon_worker_pid = fork(); - if (slon_worker_pid == 0) - { - SlonMain(); - exit(-1); - } - slon_log(SLON_CONFIG, "slon: worker process created - pid = %d\n", slon_worker_pid); while ((pid = wait(&child_status)) != slon_worker_pid) -- 1.6.3.3 --------------000606050901080609030803 Content-Type: text/x-patch; name="0003-If-the-nodelock-can-not-be-obtained-then-the-worker-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0003-If-the-nodelock-can-not-be-obtained-then-the-worker-.pa"; filename*1="tch"
- Previous message: [PATCH 3/3] If the nodelock can not be obtained then the worker will keep retrying instead of exiting. Bug # 132 discussses issues where slon can't restart because of a duplicate node lock. The watchdog instance of slon can kill the worker child and restart it. The issue is that postgresql backend for the old worker might still be around when the new worker tries to get the nodelock.
- Next message: [Slony1-patches] bug 139 + bug 132
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-patches mailing list