2010-09-23 23:44:22 +02:00
|
|
|
<!-- doc/src/sgml/install-windows.sgml -->
|
2003-09-29 20:18:35 +02:00
|
|
|
|
2010-09-23 23:44:22 +02:00
|
|
|
<chapter id="install-windows">
|
2009-01-09 14:37:18 +01:00
|
|
|
<title>Installation from Source Code on <productname>Windows</productname></title>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
<indexterm>
|
|
|
|
<primary>installation</primary>
|
|
|
|
<secondary>on Windows</secondary>
|
|
|
|
</indexterm>
|
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
2010-11-23 21:27:50 +01:00
|
|
|
It is recommended that most users download the binary distribution for
|
2013-04-10 21:37:49 +02:00
|
|
|
Windows, available as a graphical installer package
|
2020-10-06 14:15:32 +02:00
|
|
|
from the <productname>PostgreSQL</productname> website at
|
|
|
|
<ulink url="https://www.postgresql.org/download/"></ulink>. Building from source
|
2007-03-13 17:03:36 +01:00
|
|
|
is only intended for people developing <productname>PostgreSQL</productname>
|
|
|
|
or extensions.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There are several different ways of building PostgreSQL on
|
2010-01-12 21:13:32 +01:00
|
|
|
<productname>Windows</productname>. The simplest way to build with
|
2021-11-24 05:03:23 +01:00
|
|
|
Microsoft tools is to install <productname>Visual Studio 2022</productname>
|
2019-08-22 02:58:45 +02:00
|
|
|
and use the included compiler. It is also possible to build with the full
|
2022-07-14 04:22:49 +02:00
|
|
|
<productname>Microsoft Visual C++ 2015 to 2022</productname>.
|
2014-01-26 15:49:10 +01:00
|
|
|
In some cases that requires the installation of the
|
|
|
|
<productname>Windows SDK</productname> in addition to the compiler.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
It is also possible to build PostgreSQL using the GNU compiler tools
|
|
|
|
provided by <productname>MinGW</productname>, or using
|
|
|
|
<productname>Cygwin</productname> for older versions of
|
|
|
|
<productname>Windows</productname>.
|
|
|
|
</para>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
<para>
|
|
|
|
Building using <productname>MinGW</productname> or
|
|
|
|
<productname>Cygwin</productname> uses the normal build system, see
|
2017-11-23 15:39:47 +01:00
|
|
|
<xref linkend="installation"/> and the specific notes in
|
|
|
|
<xref linkend="installation-notes-mingw"/> and <xref linkend="installation-notes-cygwin"/>.
|
2011-01-31 19:40:45 +01:00
|
|
|
To produce native 64 bit binaries in these environments, use the tools from
|
2011-02-10 10:47:32 +01:00
|
|
|
<productname>MinGW-w64</productname>. These tools can also be used to
|
2011-08-07 15:11:55 +02:00
|
|
|
cross-compile for 32 bit and 64 bit <productname>Windows</productname>
|
|
|
|
targets on other hosts, such as <productname>Linux</productname> and
|
Refer to OS X as "macOS", except for the port name which is still "darwin".
We weren't terribly consistent about whether to call Apple's OS "OS X"
or "Mac OS X", and the former is probably confusing to people who aren't
Apple users. Now that Apple has rebranded it "macOS", follow their lead
to establish a consistent naming pattern. Also, avoid the use of the
ancient project name "Darwin", except as the port code name which does not
seem desirable to change. (In short, this patch touches documentation and
comments, but no actual code.)
I didn't touch contrib/start-scripts/osx/, either. I suspect those are
obsolete and due for a rewrite, anyway.
I dithered about whether to apply this edit to old release notes, but
those were responsible for quite a lot of the inconsistencies, so I ended
up changing them too. Anyway, Apple's being ahistorical about this,
so why shouldn't we be?
2016-09-25 21:40:57 +02:00
|
|
|
<productname>macOS</productname>.
|
2011-01-31 19:40:45 +01:00
|
|
|
<productname>Cygwin</productname> is not recommended for running a
|
|
|
|
production server, and it should only be used for running on
|
|
|
|
older versions of <productname>Windows</productname> where
|
2020-02-19 05:20:33 +01:00
|
|
|
the native build does not work. The official
|
2010-01-12 21:13:32 +01:00
|
|
|
binaries are built using <productname>Visual Studio</productname>.
|
2007-03-13 17:03:36 +01:00
|
|
|
</para>
|
|
|
|
|
2011-01-31 19:40:45 +01:00
|
|
|
<para>
|
2011-08-07 15:11:55 +02:00
|
|
|
Native builds of <application>psql</application> don't support command
|
2011-01-31 19:40:45 +01:00
|
|
|
line editing. The <productname>Cygwin</productname> build does support
|
|
|
|
command line editing, so it should be used where psql is needed for
|
|
|
|
interactive use on <productname>Windows</productname>.
|
|
|
|
</para>
|
|
|
|
|
2010-09-23 23:44:22 +02:00
|
|
|
<sect1 id="install-windows-full">
|
2010-01-12 21:13:32 +01:00
|
|
|
<title>Building with <productname>Visual C++</productname> or the
|
2012-01-03 14:44:26 +01:00
|
|
|
<productname>Microsoft Windows SDK</productname></title>
|
2010-01-12 21:13:32 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
PostgreSQL can be built using the Visual C++ compiler suite from Microsoft.
|
|
|
|
These compilers can be either from <productname>Visual Studio</productname>,
|
2011-04-15 15:00:42 +02:00
|
|
|
<productname>Visual Studio Express</productname> or some versions of the
|
2012-01-03 14:44:26 +01:00
|
|
|
<productname>Microsoft Windows SDK</productname>. If you do not already have a
|
2010-01-12 21:13:32 +01:00
|
|
|
<productname>Visual Studio</productname> environment set up, the easiest
|
2019-08-22 02:58:45 +02:00
|
|
|
ways are to use the compilers from
|
2021-11-24 05:03:23 +01:00
|
|
|
<productname>Visual Studio 2022</productname> or those in the
|
2019-08-22 02:58:45 +02:00
|
|
|
<productname>Windows SDK 10</productname>, which are both free downloads
|
|
|
|
from Microsoft.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
2007-03-13 17:03:36 +01:00
|
|
|
|
|
|
|
<para>
|
2016-04-29 13:59:47 +02:00
|
|
|
Both 32-bit and 64-bit builds are possible with the Microsoft Compiler suite.
|
2016-07-08 15:26:53 +02:00
|
|
|
32-bit PostgreSQL builds are possible with
|
2022-07-14 04:22:49 +02:00
|
|
|
<productname>Visual Studio 2015</productname> to
|
2021-11-24 05:03:23 +01:00
|
|
|
<productname>Visual Studio 2022</productname>,
|
2023-05-15 09:02:07 +02:00
|
|
|
as well as standalone Windows SDK releases 10 and above.
|
2016-04-29 13:59:47 +02:00
|
|
|
64-bit PostgreSQL builds are supported with
|
2023-05-15 09:02:07 +02:00
|
|
|
<productname>Microsoft Windows SDK</productname> version 10 and above or
|
2022-07-14 04:22:49 +02:00
|
|
|
<productname>Visual Studio 2015</productname> and above.
|
2018-08-24 03:33:40 +02:00
|
|
|
<!--
|
|
|
|
For 2015 requirements:
|
|
|
|
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2015-sysrequirements-vs
|
|
|
|
For 2017 requirements:
|
|
|
|
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2017-system-requirements-vs
|
2019-07-02 07:02:33 +02:00
|
|
|
For 2019 requirements:
|
|
|
|
https://docs.microsoft.com/en-us/visualstudio/releases/2019/system-requirements
|
2021-11-24 05:03:23 +01:00
|
|
|
For 2022 requirements:
|
|
|
|
https://docs.microsoft.com/en-us/visualstudio/releases/2022/system-requirements
|
2018-08-24 03:33:40 +02:00
|
|
|
-->
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2013-01-01 17:09:31 +01:00
|
|
|
The tools for building using <productname>Visual C++</productname> or
|
|
|
|
<productname>Platform SDK</productname> are in the
|
2021-05-29 20:27:37 +02:00
|
|
|
<filename>src\tools\msvc</filename> directory. When building, make sure
|
2013-01-01 17:09:31 +01:00
|
|
|
there are no tools from <productname>MinGW</productname> or
|
2007-03-13 17:03:36 +01:00
|
|
|
<productname>Cygwin</productname> present in your system PATH. Also, make
|
2010-01-12 21:13:32 +01:00
|
|
|
sure you have all the required Visual C++ tools available in the PATH. In
|
|
|
|
<productname>Visual Studio</productname>, start the
|
2012-01-03 14:44:26 +01:00
|
|
|
<application>Visual Studio Command Prompt</application>.
|
2010-01-12 21:13:32 +01:00
|
|
|
If you wish to build a 64-bit version, you must use the 64-bit version of
|
|
|
|
the command, and vice versa.
|
2020-02-21 04:05:29 +01:00
|
|
|
Starting with <productname>Visual Studio 2017</productname> this can be
|
|
|
|
done from the command line using <command>VsDevCmd.bat</command>, see
|
|
|
|
<command>-help</command> for the available options and their default values.
|
|
|
|
<command>vsvars32.bat</command> is available in
|
|
|
|
<productname>Visual Studio 2015</productname> and earlier versions for the
|
|
|
|
same purpose.
|
|
|
|
From the <application>Visual Studio Command Prompt</application>, you can
|
|
|
|
change the targeted CPU architecture, build type, and target OS by using the
|
2020-09-01 00:33:37 +02:00
|
|
|
<command>vcvarsall.bat</command> command, e.g.,
|
2020-02-21 04:05:29 +01:00
|
|
|
<command>vcvarsall.bat x64 10.0.10240.0</command> to target Windows 10
|
|
|
|
with a 64-bit release build. See <command>-help</command> for the other
|
|
|
|
options of <command>vcvarsall.bat</command>. All commands should be run from
|
|
|
|
the <filename>src\tools\msvc</filename> directory.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2022-08-12 17:35:23 +02:00
|
|
|
Before you build, you can create the file <filename>config.pl</filename>
|
2010-01-12 21:13:32 +01:00
|
|
|
to reflect any configuration options you want to change, or the paths to
|
|
|
|
any third party libraries to use. The complete configuration is determined
|
|
|
|
by first reading and parsing the file <filename>config_default.pl</filename>,
|
|
|
|
and then apply any changes from <filename>config.pl</filename>. For example,
|
|
|
|
to specify the location of your <productname>Python</productname> installation,
|
|
|
|
put the following in <filename>config.pl</filename>:
|
2010-07-29 21:34:41 +02:00
|
|
|
<programlisting>
|
2022-02-17 07:47:35 +01:00
|
|
|
$config->{python} = 'c:\python310';
|
2010-07-29 21:34:41 +02:00
|
|
|
</programlisting>
|
2010-01-12 21:13:32 +01:00
|
|
|
You only need to specify those parameters that are different from what's in
|
|
|
|
<filename>config_default.pl</filename>.
|
2007-03-13 17:03:36 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you need to set any other environment variables, create a file called
|
2007-12-19 13:29:36 +01:00
|
|
|
<filename>buildenv.pl</filename> and put the required commands there. For
|
2007-03-13 17:03:36 +01:00
|
|
|
example, to add the path for bison when it's not in the PATH, create a file
|
|
|
|
containing:
|
2010-07-29 21:34:41 +02:00
|
|
|
<programlisting>
|
|
|
|
$ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
|
|
|
|
</programlisting>
|
2000-12-21 23:30:39 +01:00
|
|
|
</para>
|
1999-01-07 03:59:45 +01:00
|
|
|
|
2016-09-08 07:42:09 +02:00
|
|
|
<para>
|
|
|
|
To pass additional command line arguments to the Visual Studio build
|
|
|
|
command (msbuild or vcbuild):
|
|
|
|
<programlisting>
|
|
|
|
$ENV{MSBFLAGS}="/m";
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
|
2023-01-09 21:08:24 +01:00
|
|
|
<sect2 id="install-windows-full-requirements">
|
2007-03-13 17:03:36 +01:00
|
|
|
<title>Requirements</title>
|
|
|
|
<para>
|
2010-01-12 21:13:32 +01:00
|
|
|
The following additional products are required to build
|
|
|
|
<productname>PostgreSQL</productname>. Use the
|
2008-07-29 17:23:44 +02:00
|
|
|
<filename>config.pl</filename> file to specify which directories the libraries
|
2007-03-14 01:15:26 +01:00
|
|
|
are available in.
|
2007-03-13 17:03:36 +01:00
|
|
|
|
|
|
|
<variablelist>
|
2010-01-12 21:13:32 +01:00
|
|
|
<varlistentry>
|
2012-01-03 14:44:26 +01:00
|
|
|
<term><productname>Microsoft Windows SDK</productname></term>
|
2010-01-12 21:13:32 +01:00
|
|
|
<listitem><para>
|
2013-02-06 20:52:29 +01:00
|
|
|
If your build environment doesn't ship with a supported version of the
|
|
|
|
<productname>Microsoft Windows SDK</productname> it
|
|
|
|
is recommended that you upgrade to the latest version (currently
|
2019-07-02 07:02:33 +02:00
|
|
|
version 10), available for download from
|
2017-10-09 03:44:17 +02:00
|
|
|
<ulink url="https://www.microsoft.com/download"></ulink>.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
You must always include the
|
|
|
|
<application>Windows Headers and Libraries</application> part of the SDK.
|
2013-02-06 20:52:29 +01:00
|
|
|
If you install a <productname>Windows SDK</productname>
|
2010-01-12 21:13:32 +01:00
|
|
|
including the <application>Visual C++ Compilers</application>,
|
|
|
|
you don't need <productname>Visual Studio</productname> to build.
|
2013-02-06 20:52:29 +01:00
|
|
|
Note that as of Version 8.0a the Windows SDK no longer ships with a
|
|
|
|
complete command-line build environment.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>ActiveState Perl</productname></term>
|
|
|
|
<listitem><para>
|
2007-03-14 01:15:26 +01:00
|
|
|
ActiveState Perl is required to run the build generation scripts. MinGW
|
2007-11-28 16:42:31 +01:00
|
|
|
or Cygwin Perl will not work. It must also be present in the PATH.
|
2007-03-14 01:15:26 +01:00
|
|
|
Binaries can be downloaded from
|
2018-07-16 10:44:06 +02:00
|
|
|
<ulink url="https://www.activestate.com"></ulink>
|
2022-09-14 04:58:13 +02:00
|
|
|
(Note: version 5.14 or later is required,
|
2008-07-29 17:17:27 +02:00
|
|
|
the free Standard Distribution is sufficient).
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
2010-01-12 21:13:32 +01:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The following additional products are not required to get started,
|
|
|
|
but are required to build the complete package. Use the
|
|
|
|
<filename>config.pl</filename> file to specify which directories the libraries
|
|
|
|
are available in.
|
|
|
|
|
|
|
|
<variablelist>
|
2007-03-13 17:03:36 +01:00
|
|
|
<varlistentry>
|
2023-11-14 10:44:44 +01:00
|
|
|
<term><productname>ActiveState Tcl</productname></term>
|
2007-03-13 17:03:36 +01:00
|
|
|
<listitem><para>
|
2017-04-05 06:38:25 +02:00
|
|
|
Required for building <application>PL/Tcl</application> (Note: version
|
2008-07-29 17:17:27 +02:00
|
|
|
8.4 is required, the free Standard Distribution is sufficient).
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><productname>Bison</productname> and
|
2007-03-14 01:15:26 +01:00
|
|
|
<productname>Flex</productname></term>
|
2013-01-01 17:09:31 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<productname>Bison</productname> and <productname>Flex</productname> are
|
2023-11-14 11:00:49 +01:00
|
|
|
required. Only <productname>Bison</productname> versions 2.3 and later
|
2022-09-06 06:41:58 +02:00
|
|
|
will work. <productname>Flex</productname> must be version 2.5.35 or later.
|
2013-01-01 17:09:31 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Both <productname>Bison</productname> and <productname>Flex</productname>
|
|
|
|
are included in the <productname>msys</productname> tool suite, available
|
2017-10-09 03:44:17 +02:00
|
|
|
from <ulink url="http://www.mingw.org/wiki/MSYS"></ulink> as part of the
|
2016-04-29 13:59:47 +02:00
|
|
|
<productname>MinGW</productname> compiler suite.
|
2013-01-01 17:09:31 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
You will need to add the directory containing
|
|
|
|
<filename>flex.exe</filename> and <filename>bison.exe</filename> to the
|
|
|
|
PATH environment variable in <filename>buildenv.pl</filename> unless
|
|
|
|
they are already in PATH. In the case of MinGW, the directory is the
|
|
|
|
<filename>\msys\1.0\bin</filename> subdirectory of your MinGW
|
2016-04-29 13:59:47 +02:00
|
|
|
installation directory.
|
2011-04-15 15:27:02 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The Bison distribution from GnuWin32 appears to have a bug that
|
|
|
|
causes Bison to malfunction when installed in a directory with
|
|
|
|
spaces in the name, such as the default location on English
|
|
|
|
installations <filename>C:\Program Files\GnuWin32</filename>.
|
2013-01-01 17:09:31 +01:00
|
|
|
Consider installing into <filename>C:\GnuWin32</filename> or use the
|
2013-05-21 03:13:13 +02:00
|
|
|
NTFS short name path to GnuWin32 in your PATH environment setting
|
2020-09-01 00:33:37 +02:00
|
|
|
(e.g., <filename>C:\PROGRA~1\GnuWin32</filename>).
|
2013-01-01 17:09:31 +01:00
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
2011-04-15 15:27:02 +02:00
|
|
|
</listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-17 15:30:00 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>Diff</productname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Diff is required to run the regression tests, and can be downloaded
|
2017-10-09 03:44:17 +02:00
|
|
|
from <ulink url="http://gnuwin32.sourceforge.net"></ulink>.
|
2007-03-17 15:30:00 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-24 23:16:49 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>Gettext</productname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Gettext is required to build with NLS support, and can be downloaded
|
2017-10-09 03:44:17 +02:00
|
|
|
from <ulink url="http://gnuwin32.sourceforge.net"></ulink>. Note that binaries,
|
2007-03-24 23:16:49 +01:00
|
|
|
dependencies and developer files are all needed.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>MIT Kerberos</productname></term>
|
|
|
|
<listitem><para>
|
2014-01-15 17:24:01 +01:00
|
|
|
Required for GSSAPI authentication support. MIT Kerberos can be
|
2010-11-23 21:27:50 +01:00
|
|
|
downloaded from
|
2020-07-18 15:43:35 +02:00
|
|
|
<ulink url="https://web.mit.edu/Kerberos/dist/index.html"></ulink>.
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><productname>libxml2</productname> and
|
2007-03-14 01:15:26 +01:00
|
|
|
<productname>libxslt</productname></term>
|
2007-03-13 17:03:36 +01:00
|
|
|
<listitem><para>
|
|
|
|
Required for XML support. Binaries can be downloaded from
|
2020-07-18 15:43:35 +02:00
|
|
|
<ulink url="https://zlatkovic.com/pub/libxml"></ulink> or source from
|
2017-10-09 03:44:17 +02:00
|
|
|
<ulink url="http://xmlsoft.org"></ulink>. Note that libxml2 requires iconv,
|
2007-03-14 01:15:26 +01:00
|
|
|
which is available from the same download location.
|
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
2021-05-11 03:43:05 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>LZ4</productname></term>
|
|
|
|
<listitem><para>
|
2022-02-19 07:06:53 +01:00
|
|
|
Required for supporting <productname>LZ4</productname> compression.
|
|
|
|
Binaries and source can be downloaded from
|
2021-05-11 03:43:05 +02:00
|
|
|
<ulink url="https://github.com/lz4/lz4/releases"></ulink>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2022-02-18 19:40:31 +01:00
|
|
|
<varlistentry>
|
2022-04-21 19:12:21 +02:00
|
|
|
<term><productname>Zstandard</productname></term>
|
2022-02-18 19:40:31 +01:00
|
|
|
<listitem><para>
|
2022-04-21 19:12:21 +02:00
|
|
|
Required for supporting <productname>Zstandard</productname> compression.
|
|
|
|
Binaries and source can be downloaded from
|
2022-02-18 19:40:31 +01:00
|
|
|
<ulink url="https://github.com/facebook/zstd/releases"></ulink>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
<varlistentry>
|
2018-06-29 02:45:44 +02:00
|
|
|
<term><productname>OpenSSL</productname></term>
|
2007-03-13 17:03:36 +01:00
|
|
|
<listitem><para>
|
|
|
|
Required for SSL support. Binaries can be downloaded from
|
2018-07-16 10:44:06 +02:00
|
|
|
<ulink url="https://slproweb.com/products/Win32OpenSSL.html"></ulink>
|
2018-06-29 02:45:44 +02:00
|
|
|
or source from <ulink url="https://www.openssl.org"></ulink>.
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
2008-02-28 13:17:59 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>ossp-uuid</productname></term>
|
|
|
|
<listitem><para>
|
2010-11-23 21:27:50 +01:00
|
|
|
Required for UUID-OSSP support (contrib only). Source can be
|
2008-02-28 13:17:59 +01:00
|
|
|
downloaded from
|
2017-10-09 03:44:17 +02:00
|
|
|
<ulink url="http://www.ossp.org/pkg/lib/uuid/"></ulink>.
|
2008-02-28 13:17:59 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>Python</productname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Required for building <application>PL/Python</application>. Binaries can
|
2018-07-16 10:44:06 +02:00
|
|
|
be downloaded from <ulink url="https://www.python.org"></ulink>.
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
2007-03-14 01:15:26 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><productname>zlib</productname></term>
|
2007-03-13 17:03:36 +01:00
|
|
|
<listitem><para>
|
2007-03-14 01:15:26 +01:00
|
|
|
Required for compression support in <application>pg_dump</application>
|
|
|
|
and <application>pg_restore</application>. Binaries can be downloaded
|
2020-07-18 15:43:35 +02:00
|
|
|
from <ulink url="https://www.zlib.net"></ulink>.
|
2007-03-14 01:15:26 +01:00
|
|
|
</para></listitem>
|
2007-03-13 17:03:36 +01:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2023-01-09 21:08:24 +01:00
|
|
|
<sect2 id="install-windows-full-64-bit">
|
2019-09-08 10:26:35 +02:00
|
|
|
<title>Special Considerations for 64-Bit Windows</title>
|
2010-01-12 21:13:32 +01:00
|
|
|
|
|
|
|
<para>
|
Make Windows 10 the minimal runtime requirement for WIN32
This commit bumps the runtime value of _WIN32_WINNT to be 0x0A00 for any
builds on Windows. Hence, this makes Windows 10 the minimal requirement
when running PostgreSQL under WIN32, be it for builds of Cygwin, MinGW
or Visual Studio.
The previous minimal runtime version was either Windows Vista when
building with at least Visual Studio 2015 or Windows XP for the rest.
Windows 10 is the most modern version supported by Microsoft, and per
discussion, as we don't have buildfarm members that run older versions
anymore, this is the minimal supported version that suits better for our
needs. This will actually make easier the development of some patches,
two being async I/O and large page handling by avoiding a lot of
compatibility gotchas, on platforms that have most likely few users
anyway.
It is possible to remove MIN_WINNT in win32.h and the macros
IsWindowsXXXOrGreater() that were used in the code at runtime to check
which version of Windows was getting used. The change in pg_locale.c
comes from Juan. Note that all my tests passed, and that the CI is
green. The buildfarm will quickly tell if this needs more adjustments.
Author: Michael Paquier, Juan José Santamaría Flecha
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/Yo7tHKD8VCkeNi71@paquier.xyz
2022-07-07 06:25:45 +02:00
|
|
|
PostgreSQL will only build for the x64 architecture on 64-bit Windows.
|
2010-01-12 21:13:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Mixing 32- and 64-bit versions in the same build tree is not supported.
|
|
|
|
The build system will automatically detect if it's running in a 32- or
|
|
|
|
64-bit environment, and build PostgreSQL accordingly. For this reason, it
|
|
|
|
is important to start the correct command prompt before building.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2022-04-13 07:42:13 +02:00
|
|
|
To use a server-side third party library such as <productname>Python</productname> or
|
2018-06-29 02:45:44 +02:00
|
|
|
<productname>OpenSSL</productname>, this library <emphasis>must</emphasis> also be
|
2010-01-12 21:13:32 +01:00
|
|
|
64-bit. There is no support for loading a 32-bit library in a 64-bit
|
|
|
|
server. Several of the third party libraries that PostgreSQL supports may
|
|
|
|
only be available in 32-bit versions, in which case they cannot be used with
|
|
|
|
64-bit PostgreSQL.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2023-01-09 21:08:24 +01:00
|
|
|
<sect2 id="install-windows-full-build">
|
2007-03-13 17:03:36 +01:00
|
|
|
<title>Building</title>
|
|
|
|
|
|
|
|
<para>
|
2007-04-18 12:14:06 +02:00
|
|
|
To build all of PostgreSQL in release configuration (the default), run the
|
2007-03-14 01:15:26 +01:00
|
|
|
command:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>build</userinput>
|
|
|
|
</screen>
|
2007-04-18 12:14:06 +02:00
|
|
|
To build all of PostgreSQL in debug configuration, run the command:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>build DEBUG</userinput>
|
|
|
|
</screen>
|
2007-03-13 17:03:36 +01:00
|
|
|
To build just a single project, for example psql, run the commands:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>build psql</userinput>
|
|
|
|
<userinput>build DEBUG psql</userinput>
|
|
|
|
</screen>
|
2007-04-18 12:14:06 +02:00
|
|
|
To change the default build configuration to debug, put the following
|
2007-12-19 13:29:36 +01:00
|
|
|
in the <filename>buildenv.pl</filename> file:
|
2010-07-29 21:34:41 +02:00
|
|
|
<programlisting>
|
|
|
|
$ENV{CONFIG}="Debug";
|
|
|
|
</programlisting>
|
2007-03-13 17:03:36 +01:00
|
|
|
</para>
|
|
|
|
|
2000-12-21 23:30:39 +01:00
|
|
|
<para>
|
2007-03-13 17:03:36 +01:00
|
|
|
It is also possible to build from inside the Visual Studio GUI. In this
|
2007-03-14 01:15:26 +01:00
|
|
|
case, you need to run:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>perl mkvcbuild.pl</userinput>
|
|
|
|
</screen>
|
2007-03-13 17:03:36 +01:00
|
|
|
from the command prompt, and then open the generated
|
2007-03-14 01:15:26 +01:00
|
|
|
<filename>pgsql.sln</filename> (in the root directory of the source tree)
|
|
|
|
in Visual Studio.
|
2000-12-21 23:30:39 +01:00
|
|
|
</para>
|
2007-03-13 17:03:36 +01:00
|
|
|
</sect2>
|
|
|
|
|
2023-01-09 21:08:24 +01:00
|
|
|
<sect2 id="install-windows-full-clean-inst">
|
2011-01-29 19:00:18 +01:00
|
|
|
<title>Cleaning and Installing</title>
|
2007-03-13 17:03:36 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
Most of the time, the automatic dependency tracking in Visual Studio will
|
2007-03-14 01:15:26 +01:00
|
|
|
handle changed files. But if there have been large changes, you may need
|
|
|
|
to clean the installation. To do this, simply run the
|
|
|
|
<filename>clean.bat</filename> command, which will automatically clean out
|
2008-03-14 18:28:23 +01:00
|
|
|
all generated files. You can also run it with the
|
2008-02-06 16:13:25 +01:00
|
|
|
<parameter>dist</parameter> parameter, in which case it will behave like
|
|
|
|
<userinput>make distclean</userinput> and remove the flex/bison output files
|
|
|
|
as well.
|
2007-03-13 17:03:36 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
By default, all files are written into a subdirectory of the
|
2007-03-14 01:15:26 +01:00
|
|
|
<filename>debug</filename> or <filename>release</filename> directories. To
|
|
|
|
install these files using the standard layout, and also generate the files
|
|
|
|
required to initialize and use the database, run the command:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>install c:\destination\directory</userinput>
|
2014-01-26 23:03:13 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you want to install only the client applications and
|
|
|
|
interface libraries, then you can use these commands:
|
|
|
|
<screen>
|
|
|
|
<userinput>install c:\destination\directory client</userinput>
|
2010-07-29 21:34:41 +02:00
|
|
|
</screen>
|
2007-03-13 17:03:36 +01:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2023-01-09 21:08:24 +01:00
|
|
|
<sect2 id="install-windows-full-reg-tests">
|
2011-01-29 19:00:18 +01:00
|
|
|
<title>Running the Regression Tests</title>
|
2007-03-21 20:22:52 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
To run the regression tests, make sure you have completed the build of all
|
|
|
|
required parts first. Also, make sure that the DLLs required to load all
|
2007-11-28 16:42:31 +01:00
|
|
|
parts of the system (such as the Perl and Python DLLs for the procedural
|
|
|
|
languages) are present in the system path. If they are not, set it through
|
2007-12-19 13:29:36 +01:00
|
|
|
the <filename>buildenv.pl</filename> file. To run the tests, run one of
|
2007-03-21 20:22:52 +01:00
|
|
|
the following commands from the <filename>src\tools\msvc</filename>
|
|
|
|
directory:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>vcregress check</userinput>
|
|
|
|
<userinput>vcregress installcheck</userinput>
|
|
|
|
<userinput>vcregress plcheck</userinput>
|
|
|
|
<userinput>vcregress contribcheck</userinput>
|
2015-04-17 04:39:52 +02:00
|
|
|
<userinput>vcregress modulescheck</userinput>
|
2014-12-17 11:14:34 +01:00
|
|
|
<userinput>vcregress ecpgcheck</userinput>
|
|
|
|
<userinput>vcregress isolationcheck</userinput>
|
2015-11-19 05:32:16 +01:00
|
|
|
<userinput>vcregress bincheck</userinput>
|
2016-02-26 20:13:30 +01:00
|
|
|
<userinput>vcregress recoverycheck</userinput>
|
2023-09-26 01:16:12 +02:00
|
|
|
<userinput>vcregress taptest</userinput>
|
2010-07-29 21:34:41 +02:00
|
|
|
</screen>
|
2007-03-21 20:22:52 +01:00
|
|
|
|
2010-02-03 18:25:06 +01:00
|
|
|
To change the schedule used (default is parallel), append it to the
|
2007-11-28 16:42:31 +01:00
|
|
|
command line like:
|
2010-07-29 21:34:41 +02:00
|
|
|
<screen>
|
|
|
|
<userinput>vcregress check serial</userinput>
|
2023-09-26 01:16:12 +02:00
|
|
|
</screen>
|
|
|
|
|
|
|
|
<command>vcregress taptest</command> can be used to run the TAP tests
|
|
|
|
of a target directory, like:
|
|
|
|
<screen>
|
|
|
|
<userinput>vcregress taptest src\bin\initdb\</userinput>
|
2010-07-29 21:34:41 +02:00
|
|
|
</screen>
|
2007-03-21 20:22:52 +01:00
|
|
|
|
|
|
|
For more information about the regression tests, see
|
2017-11-23 15:39:47 +01:00
|
|
|
<xref linkend="regress"/>.
|
2007-03-21 20:22:52 +01:00
|
|
|
</para>
|
2015-07-29 18:17:02 +02:00
|
|
|
|
|
|
|
<para>
|
2023-09-26 01:16:12 +02:00
|
|
|
Running the regression tests on client programs with
|
|
|
|
<command>vcregress bincheck</command>, on recovery tests with
|
|
|
|
<command>vcregress recoverycheck</command>, or TAP tests specified with
|
|
|
|
<command>vcregress taptest</command> requires an additional Perl module
|
2016-02-29 22:16:59 +01:00
|
|
|
to be installed:
|
2015-07-29 18:17:02 +02:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><productname>IPC::Run</productname></term>
|
|
|
|
<listitem><para>
|
2017-10-09 03:44:17 +02:00
|
|
|
As of this writing, <literal>IPC::Run</literal> is not included in the
|
2015-07-29 18:17:02 +02:00
|
|
|
ActiveState Perl installation, nor in the ActiveState Perl Package
|
|
|
|
Manager (PPM) library. To install, download the
|
2022-11-16 10:25:21 +01:00
|
|
|
<filename>IPC-Run-<version>.tar.gz</filename> source archive from
|
|
|
|
<acronym>CPAN</acronym>,
|
2022-11-16 10:24:37 +01:00
|
|
|
at <ulink url="https://metacpan.org/dist/IPC-Run"></ulink>, and
|
2017-10-09 03:44:17 +02:00
|
|
|
uncompress. Edit the <filename>buildenv.pl</filename> file, and add a PERL5LIB
|
|
|
|
variable to point to the <filename>lib</filename> subdirectory from the
|
2015-07-29 18:17:02 +02:00
|
|
|
extracted archive. For example:
|
|
|
|
<programlisting>
|
|
|
|
$ENV{PERL5LIB}=$ENV{PERL5LIB} . ';c:\IPC-Run-0.94\lib';
|
|
|
|
</programlisting>
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
2021-03-05 02:12:49 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
The TAP tests run with <command>vcregress</command> support the
|
|
|
|
environment variables <varname>PROVE_TESTS</varname>, that is expanded
|
|
|
|
automatically using the name patterns given, and
|
|
|
|
<varname>PROVE_FLAGS</varname>. These can be set on a Windows terminal,
|
|
|
|
before running <command>vcregress</command>:
|
|
|
|
<programlisting>
|
|
|
|
set PROVE_FLAGS=--timer --jobs 2
|
|
|
|
set PROVE_TESTS=t/020*.pl t/010*.pl
|
|
|
|
</programlisting>
|
|
|
|
It is also possible to set up those parameters in
|
|
|
|
<filename>buildenv.pl</filename>:
|
|
|
|
<programlisting>
|
|
|
|
$ENV{PROVE_FLAGS}='--timer --jobs 2'
|
|
|
|
$ENV{PROVE_TESTS}='t/020*.pl t/010*.pl'
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
|
2022-11-16 10:25:21 +01:00
|
|
|
<para>
|
|
|
|
Additionally, the behavior of TAP tests can be controlled by a set of
|
|
|
|
environment variables, see <xref linkend="regress-tap-vars" />.
|
|
|
|
</para>
|
|
|
|
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
<para>
|
|
|
|
Some of the TAP tests depend on a set of external commands that would
|
|
|
|
optionally trigger tests related to them. Each one of those variables
|
|
|
|
can be set or unset in <filename>buildenv.pl</filename>:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>GZIP_PROGRAM</varname></term>
|
|
|
|
<listitem><para>
|
2022-02-21 01:55:55 +01:00
|
|
|
Path to a <application>gzip</application> command. The default is
|
|
|
|
<literal>gzip</literal>, which will search for a command by that
|
|
|
|
name in the configured <envar>PATH</envar>.
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>LZ4</varname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Path to a <application>lz4</application> command. The default is
|
2022-02-21 01:55:55 +01:00
|
|
|
<literal>lz4</literal>, which will search for a command by that
|
|
|
|
name in the configured <envar>PATH</envar>.
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2022-10-20 21:01:05 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><varname>OPENSSL</varname></term>
|
|
|
|
<listitem><para>
|
2023-04-12 06:03:09 +02:00
|
|
|
Path to an <application>openssl</application> command. The default is
|
2022-10-20 21:01:05 +02:00
|
|
|
<literal>openssl</literal>, which will search for a command by that
|
|
|
|
name in the configured <envar>PATH</envar>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><varname>TAR</varname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Path to a <application>tar</application> command. The default is
|
2022-02-21 01:55:55 +01:00
|
|
|
<literal>tar</literal>, which will search for a command by that
|
|
|
|
name in the configured <envar>PATH</envar>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>ZSTD</varname></term>
|
|
|
|
<listitem><para>
|
|
|
|
Path to a <application>zstd</application> command. The default is
|
|
|
|
<literal>zstd</literal>, which will search for a command by that
|
|
|
|
name in the configured <envar>PATH</envar>.
|
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment
variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able
use those commands. This makes the settings more consistent with
src/Makefile.global.in, as the same default gets used for Make and MSVC
builds.
Each parameter can be changed in buildenv.pl, but as a default gets
assigned after loading buldenv.pl, it is not possible to unset any of
these, and using an empty value would not work with "||=" either. As
some environments may not have a compatible command in their PATH (tar
coming from MinGW is an issue, for one), this could break tests without
an exit path to bypass any failing test. This commit changes things so
as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before
loading buildenv.pl, not after. This way, we keep the same amount of
compatibility as a GNU build with the same defaults, and it becomes
possible to unset any of those values.
While on it, this adds some documentation about those three variables in
the section dedicated to the TAP tests for MSVC.
Per discussion with Andrew Dunstan.
Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz
Backpatch-through: 10
2021-12-15 02:39:24 +01:00
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
2007-03-21 20:22:52 +01:00
|
|
|
</sect2>
|
|
|
|
|
2007-03-13 17:03:36 +01:00
|
|
|
</sect1>
|
2000-12-21 23:30:39 +01:00
|
|
|
</chapter>
|