Re: Porting to Native WindowsNT/2000

Поиск
Список
Период
Сортировка
От Ken Hirsch
Тема Re: Porting to Native WindowsNT/2000
Дата
Msg-id 008301c133cc$b42bd140$52463dd0@hppav
обсуждение исходный текст
Ответ на Porting to Native WindowsNT/2000  (Dwayne Miller <dmiller@espgroup.net>)
Ответы Re: Porting to Native WindowsNT/2000  (Ian Lance Taylor <ian@airs.com>)
Re: Porting to Native WindowsNT/2000  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Ian Lance Taylor" <ian@airs.com> wrote:
> "Dwayne Miller" <dmiller@espgroup.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?





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ian Lance Taylor
Дата:
Сообщение: Re: Porting to Native WindowsNT/2000
Следующее
От: "Vladimir V. Zolotych"
Дата:
Сообщение: Need help in composing PostgreSQL query