Re: Roadmap for a Win32 port - Mailing list pgsql-hackers

From Jon Franz
Subject Re: Roadmap for a Win32 port
Date
Msg-id 001201c20ce3$6e21bed0$a1ed03c7@dev.ngcn
Whole thread Raw
In response to Re: Roadmap for a Win32 port  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Roadmap for a Win32 port  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-hackers
One note: SGI developers discovered they could get amazing performance using
as hybrid threaded and forked-process model with apache - we might want to
look into this.  They even have a library for network-communication
utilizing thier 'state threads' model.  Please see:

http://state-threads.sourceforge.net/docs/st.html

Thus, on platforms where it can be supported, we should keep in mind that a
hybrid multiprocess/multithreaded postgresql might be the fastest
solution...


----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
To: "Igor Kovalenko" <Igor.Kovalenko@motorola.com>
Cc: "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Sent: Wednesday, June 05, 2002 4:05 PM
Subject: Re: [HACKERS] Roadmap for a Win32 port


> Igor Kovalenko wrote:
> > I might be naive here, but would not proper threading model remove the
need
> > for fork() altogether? On both Unix and Win32? Should not be too hard to
> > come up with abstraction which encapsulates POSIX, BeOS and Win32
threads...
> > I am not sure how universal POSIX threads are by now. Any important Unix
> > platforms which don't support them yet?
> >
> > This has downside of letting any bug to kill the whole thing. On the
bright
> > side, performance should be better on some platforms (note however,
Apache
> > group still can't come up with implementation of threaded model which
would
> > provide better performance than forked or other models). The need to
deal
> > with possibility of 'alien' postmaster running along with orphaned
backends
> > would also be removed since there would be only one process.
> >
> > Issue of thread safety of code will come up undoubtedly and some things
will
> > probably have to be revamped. But in long term this is probably best way
if
> > you want to have efficient and uniform Unix AND Win32 implementations.
> >
> > I am not too familiar with Win32. Speaking about POSIX threads, it would
be
> > something like a thread pool with low & high watermarks. Main thread
would
> > handle thread pool and hand over requests to worker threads (blocked on
> > condvar). How does that sound?
>
> Good summary.  I think we would support both threaded and fork()
> operation, and users can control which they prefer.  For a web backend
> where many sessions are a single query, people may want to give up the
> stability of fork() and go with threads, even on Unix.
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Roadmap for a Win32 port
Next
From: Neil Conway
Date:
Subject: Re: Roadmap for a Win32 port