Compiling PostgreSQL On Native Win32 FAQ

Last updated: Thu Oct 14 18:22:57 EDT 2004

Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)

The most recent version of this document can be viewed at http://www.postgresql.org/docs/faqs.FAQ_MINGW.html.

The FAQ for running PostgreSQL on native Win32 is at http://pginstaller.projects.postgresql.org/FAQ_windows.html.

The native Win32 port is built from source using MinGW tools.  There is also a precompiled binary installer called pginstaller which you can download from http://pgfoundry.org/projects/pginstaller.  It is a fully native build and uses no additional software like MinGW.

Tools for Building Binaries

The native Win32 port requires a 32-bit NT-based Microsoft operating system, like Windows NT 4, Windows 2000/2003, or Windows XP. (NT 4 doesn't support tablespaces because it doesn't support the junction points needed for symlinks.)  Earlier operating systems do not have sufficient infrastructure. Building the port also requires MinGW and Msys, which can be downloaded from http://www.mingw.org/. MinGW is a Unix-like build environment for Microsoft operating systems. Msys is a collection of unix tools required to run shell scripts like configure.  Neither is required to run the resulting binaries;  they are needed only for creating the binaries.  We have no intention of supporting Visual C; their build environment is just too different from Unix, and maintenance of such a build environment would be too burdensome.

Steps For Building Binaries

Note:  it is suggested that you run psql under CMD.EXE., as the Msys console has buffering issues.

If you make a change that you want to contribute, make a context diff and send it to the mailing list.

Access

The mailing list for discussion is pgsql-hackers-win32@postgresql.org. You can subscribe by sending an email body containing the word subscribe to pgsql-hackers-win32-request@postgresql.org.

Resources

There are several resources that helped us complete this port: