Re: How much work is a native Windows application?

From: mlw <markw(at)mohawksoft(dot)com>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How much work is a native Windows application?
Date: 2002-05-07 18:32:04
Message-ID: 3CD81DA4.F6B2038D@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Marc G. Fournier" wrote:
>
> http://www.mkssoftware.com/docs/man3/fork.3.asp
>
> http://www.computing.net/programming/wwwboard/forum/60.html
>
> http://www.research.att.com/sw/tools/uwin (Semaphores & Fork)

These are pretty much what I have been saying.

Is PostgreSQL going to implement its own fork()? If so, what's the point? Just
use cygwin.

Without trying to sound conceited, I can write a fork() call, that's not the
problem. How much time will it take to do and get right? What about all the
infrastructure? Tracking file handles and resources allocated so that they can
be properly duplicated for the child process, etc. It is a lot of work, and to
do it for a BSD license, I shouldn't reference the cygwin code to do so.

The semaphore, shared memory, file API, etc. all these are straight forward.
They can be handled with a set of macros and some thin functions.

The problems of a native PostgreSQL on Windows is fork(), and all the
subtleties that go with it like ownership of system resources allocated by the
parent and passed to the child and initialization of global and static
variables.

Adding fork() to postgres seems silly. Cygwin does it already, and it seems
like it is outside the scope of what should be supported by PostgreSQL.

Since RedHat owns cygwin and they want RedHat database to be a success, maybe
they can make an exception to the GNU license for PostgreSQL.

Does anyone think it is a good idea for PostgreSQL to implement it's own
version of fork()?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2002-05-07 19:05:00 Couple of schema queries...
Previous Message Hannu Krosing 2002-05-07 18:28:39 Re: OK, lets talk portability.