Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
От
Magnus Hagander
Тема
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Дата
Msg-id
20071026120702.GE1398@svr2.hagander.net
Ответ на
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit (Trevor Talbot)
Список
Дерево обсуждения
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Dave Page <dpage@postgresql.org>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit "Trevor Talbot" <quension@gmail.com>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit "Trevor Talbot" <quension@gmail.com>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Dave Page <dpage@postgresql.org>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Dave Page <dpage@postgresql.org>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit "Trevor Talbot" <quension@gmail.com>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit "Trevor Talbot" <quension@gmail.com>
Re: 8.2.3: Server crashes on Windows using Eclipse/Junit Magnus Hagander <magnus@hagander.net>
On Mon, Oct 22, 2007 at 01:19:24PM -0700, Trevor Talbot wrote: > On 10/22/07, Magnus Hagander wrote: > > Trevor Talbot wrote: > > > > I'd probably take the approach of combining win32_waitpid() and > > > threads. You'd end up with 1 thread per 64 backends; when something > > > interesting happens the thread could push the info onto a queue, which > > > the new win32_waitpid() would check. Use APCs to add new backends to > > > threads with free slots. > > > > 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. > > Oh, good call -- I keep forgetting the native thread pool exists. Taking this one to -hackers once and for all now... Can you try the attached patch? See how many backends you can get up to. This patch changes from using a single thread for each backend started to using the builtin threadpool functionality. It also replaces the pid/handle arrays with an i/o completion port. The net result is also, imho, much more readable code :-) Beware - there's still plenty of debugging code in there :-) //Magnus
В списке pgsql-hackers по дате отправления