Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit - Mailing list pgsql-hackers

From Trevor Talbot
Subject Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit
Date
Msg-id 90bce5730710221344r6262db3bn85e7a8796c3ba467@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 10/22/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > I was planning to make it even easier and let Windows do the job for us,
> > just using RegisterWaitForSingleObject(). Does the same - one thread per
> > 64 backends, but we don't have to deal with the queueing ourselves.
> > Should be rather trivial to do.
>
> How can that possibly work?  Backends have to be able to run
> concurrently, and I don't see how they'll do that if they share a stack.

This is about what postmaster does for its SIGCHLD wait equivalent on
win32.  The 64 comes from Windows' object/event mechanism, which lets
you perform a blocking wait on up to that many handles in a single
call.  Currently postmaster is creating a new thread to wait on only
one backend at a time, so it ends up with too many threads.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Feature Freeze date for 8.4
Next
From: Magnus Hagander
Date:
Subject: Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit