> > Here's a patch implementing the "thread method" to
> workaround the bug
> > with socket calls in signal handlers. See details in mail to
> > pgsql-hackers-win32 a couple of minutes ago.
> Looks ok, but wouldn't it be better placed in pgstat.c?
Actually, I don't think so. I considered it, and chose to put it in
postmaster.c for the following reason:
The functon pgstat_beterm itself is *not* the problem. In theory, it can
be called from places that are not signal handlers (sure, it's not done
today I think, but internal-API-wise, it could). That goes against
putting the fix ther.
Also, by putting the code inside the actual signal handler function, we
put the fix close to the problem, which makes it more visible in the
"trouble area". The problem is, IMHO, in the signal handler, and not in
the actual pgstat function.
I'll be happy to change this if you still think it's better, but I
figured I shuold put out my argument for doing what I did first :-)
pgsql-patches by date
|Next:||From: Karel Zak||Date: 2004-03-23 10:10:52|
|Subject: Re: pstrndup()|
|Previous:||From: Magnus Hagander||Date: 2004-03-23 08:33:36|
|Subject: Re: Initial eventlog support on win32 |