Re: Roadmap for a Win32 port

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Igor Kovalenko <Igor(dot)Kovalenko(at)motorola(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Roadmap for a Win32 port
Date: 2002-06-05 20:05:02
Message-ID: 200206052005.g55K52615577@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2002-06-05 20:28:46 Re: Operator Comments
Previous Message Bruce Momjian 2002-06-05 20:00:10 Re: Operator Comments