Skip site navigation (1) Skip section navigation (2)

Re: Porting to Native WindowsNT/2000

From: "Ken Hirsch" <kenhirsch(at)myself(dot)com>
To: "Dwayne Miller" <dmiller(at)espgroup(dot)net>, "Ian Lance Taylor" <ian(at)airs(dot)com>
Cc: "mlw" <markw(at)mohawksoft(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Porting to Native WindowsNT/2000
Date: 2001-09-02 16:27:09
Message-ID: 008301c133cc$b42bd140$52463dd0@hppav (view raw or flat)
Thread:
Lists: pgsql-hackers
"Ian Lance Taylor" <ian(at)airs(dot)com> wrote:
> "Dwayne Miller" <dmiller(at)espgroup(dot)net> writes:
>
> > Well,  for one.... I have no idea what cygwin is, or what it does to
> > your system, or what security vulnerabilities it might add to your
> > system.  It comes with alot of stuff that I may or may not need,  but
> > what components I need to run Postgres is not clear.
>
> Cygwin is a Unix environment for Windows.  For information, see
>     http://cygwin.com/
>
> Cygwin comes with a lot of stuff which you don't need to run Postgres.
> Simply having that stuff on your computer will not introduce any
> security vulnerabilities if you don't run the programs.  Cygwin is
> simply a DLL and a bunch of Unix programs.  It has no server
> component.
>
> In order to build Postgres, you will need the compiler and associated
> tools.  In order to run all the Postgres commands, you will need the
> shell and several of the tools.



>
> In fact, I believe that a cygwin distribution actually comes with
> Postgres prebuilt and ready to run.

Yes, if you use the setup.exe at cygwin.com, it will by default include
postgres.  It would be nice if we had a minimal list of programs need to run
Postgresql

>
> (To be honest, the idea of worrying about security vulnerabilities on
> Windows seems odd to me.  If you are honestly worried about security
> on your database server, the first step is to stop running Windows.)

That's just a cheap shot.  I've seen no evidence that Windows NT/2000 is
inherently less secure than any given Unix or Linux distribution, it is just
a lot more popular and tends to have less experienced system administrators.

Having an easy-to-install Windows set up would be a plus for Postgres.
There are millions of Windows NT servers out there.

>
> > Two.... could Postgres be made more efficient on Windows if it ran
> > without cygwin?
>
> Yes.  Cygwin adds measurable overhead to all I/O operations, and
> obviously a database does a lot of I/O.  Postgres employs operations
> which are fast on Unix but are very slow on cygwin, such as fork.
>
> As mlw said, porting Postgres to run natively on Windows would be a
> significant effort.  The forking mechanism it uses currently would
> have to be completely rearchitected.

This is true.  However, a process-pool architecture would benefit Postgres
on other platforms besides Windows.  Postgresql has been ported to the
HP3000 MPE/iX operating system, for example, which is POSIX-compliant, but
has an awfully slow fork().

>  The buffer, file manager, and
> networking code would have to be rewritten.

I don't think this is true.   Most of the unix-style interfaces are
supported out of the box by the Microsoft C compiler.

>
> > Three.... can you start cygwin programs on startup of the system?
>
> Sure.  cygwin programs are just Windows programs which use a
> particular DLL.

It's not quite as simple as that.  You can run it as a service under the
SRVANY program, but that doesn't provide for a clean shut-down.  Has anybody
written an NT service wrapper for Postgresql?




In response to

Responses

pgsql-hackers by date

Next:From: Ian Lance TaylorDate: 2001-09-02 20:59:55
Subject: Re: Porting to Native WindowsNT/2000
Previous:From: Hannu KrosingDate: 2001-09-02 14:28:01
Subject: Re: Porting to Native WindowsNT/2000

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group