Win32 port (native)

Lists: pgsql-hackers
From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Postgres development <pgsql-hackers(at)postgresql(dot)org>
Subject: Win32 port (native)
Date: 2003-01-17 21:55:31
Message-ID: 3E287BD3.9A26D319@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Okay,

I have finally extracted out a patch that applied to a 7.2.1 tree get's
me something that compiles and passes all regression tests on RedHat
Linux and Windows 2000.

To clearify upfront, even if the build process of this port uses a few
cygwin tools, the final executables and libraries do not depend on
cygwin.

I need to write up the 42 steps how to build. For those who want to be
prepared, you'll need a unix system to patch, a win32 environment with
VC++ 6.0, Tcl, bison*, flex*, sed* and touch* (*=from cygwin). To run
the regression tests, one would need an MKS toolkit as it crashes the
cygwin bash ... we didn't bother with those minor issues. I will post 2
patches later (meaning, probably tomorrow or latest Sunday) to the
patches list. One will be all the changes to existing files (about
11,500 lines context diff), one will be the new files added.

As a PostgreSQL coreteam member I want to thank my employer, the
PeerDirect Corporation, for contributing this work, which IMHO is an
important step for PostgreSQL.

What we need from here are some ideas how this port can be lifted up to
the current 7.4 development tree. There are some TODO items scattered
throughout the code. But, it compiles and works, so it's a good point to
start from I think. Looking at the demand for a native Win32 port I
would expect some people willing to take it from there.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Postgres development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win32 port (native)
Date: 2003-01-17 22:14:08
Message-ID: 200301172214.h0HME8t24478@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


My idea was to go through the patch and break it out into the items it
addresses:

fork/exec
loop rename test
handle \r in COPY
copydir for cp -r
backslash tests
rmdir not recursive for rm -r
shared memory could map to new address in exec child
compatibility defines
file path separators
root directory
rename atomicity
spinlock changes
str[r]chr
timeval for psql
DWORD in help.c
initdb
etc.

Once it is split out, each piece can be analyzed to make sure we are
doing things the right way, then applied in parts.

---------------------------------------------------------------------------

Jan Wieck wrote:
> Okay,
>
> I have finally extracted out a patch that applied to a 7.2.1 tree get's
> me something that compiles and passes all regression tests on RedHat
> Linux and Windows 2000.
>
> To clearify upfront, even if the build process of this port uses a few
> cygwin tools, the final executables and libraries do not depend on
> cygwin.
>
> I need to write up the 42 steps how to build. For those who want to be
> prepared, you'll need a unix system to patch, a win32 environment with
> VC++ 6.0, Tcl, bison*, flex*, sed* and touch* (*=from cygwin). To run
> the regression tests, one would need an MKS toolkit as it crashes the
> cygwin bash ... we didn't bother with those minor issues. I will post 2
> patches later (meaning, probably tomorrow or latest Sunday) to the
> patches list. One will be all the changes to existing files (about
> 11,500 lines context diff), one will be the new files added.
>
> As a PostgreSQL coreteam member I want to thank my employer, the
> PeerDirect Corporation, for contributing this work, which IMHO is an
> important step for PostgreSQL.
>
> What we need from here are some ideas how this port can be lifted up to
> the current 7.4 development tree. There are some TODO items scattered
> throughout the code. But, it compiles and works, so it's a good point to
> start from I think. Looking at the demand for a native Win32 port I
> would expect some people willing to take it from there.
>
>
> Jan
>
> --
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me. #
> #================================================== JanWieck(at)Yahoo(dot)com #
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Win32 port (native)
Date: 2003-01-18 00:48:58
Message-ID: 3E28A47A.5060400@oli.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jan Wieck wrote:
> As a PostgreSQL coreteam member I want to thank my employer, the
> PeerDirect Corporation, for contributing this work, which IMHO is an
> important step for PostgreSQL.

Yes, a very important step. A big thank you to PeerDirect.

> What we need from here are some ideas how this port can be lifted up to
> the current 7.4 development tree. There are some TODO items scattered
> throughout the code. But, it compiles and works, so it's a good point to
> start from I think. Looking at the demand for a native Win32 port I
> would expect some people willing to take it from there.

I have a request for this. Would it be possible to give priority to the
client utilities?
Apart from possibly helping in the rest of the port by facilitating
dumping/restoring/testing, it would also enable those working on Windows
clients with unix backends to work more easily now already. Personally,
I am now using the psql that came with the beta4 of the Win32 port for
everything. Even when connecting to a 7.3 server the problems (no schema
support etc.) are far outweighted by the advantages of having a
lightweight (just libpq.dll + psql.exe, no cygwin, no installation)
client tool. But it would be nice if schema support etc. was available
and with the exception of pg_dump I am personally not very concerned
about using beta client utilities (while I would have reservations about
using a beta database server).

Jochem


From: Joe Conway <mail(at)joeconway(dot)com>
To: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Win32 port (native)
Date: 2003-01-18 02:06:39
Message-ID: 3E28B6AF.9030708@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jochem van Dieten wrote:
> everything. Even when connecting to a 7.3 server the problems (no schema
> support etc.) are far outweighted by the advantages of having a
> lightweight (just libpq.dll + psql.exe, no cygwin, no installation)
> client tool. But it would be nice if schema support etc. was available

You can already compile libpq and psql on win32; see:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/install-win32.html

Joe