> > 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 :-)


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to