Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

From: "Trevor Talbot" <quension(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>, PostgreSQL <pgsql-general(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit
Date: 2007-10-22 20:44:29
Message-ID: 90bce5730710221344r6262db3bn85e7a8796c3ba467@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 10/22/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-10-22 20:45:02 Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Tom Lane 2007-10-22 20:26:10 Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-10-22 20:45:02 Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Tom Lane 2007-10-22 20:34:43 Re: Feature Freeze date for 8.4