Home Explore Blog CI



postgresql

46th chunk of `doc/src/sgml/installation.sgml`
2658a32e9352857473551e1b99b3c7ddf6817fae1cc83f1e0000000100000fa0
 NeXTSTEP, QNX, SCO, SINIX, Sprite, SunOS,
   Tru64 UNIX, and ULTRIX.
  </para>
 </sect1>

 <sect1 id="installation-platform-notes">
  <title>Platform-Specific Notes</title>

  <para>
   This section documents additional platform-specific issues
   regarding the installation and setup of PostgreSQL.  Be sure to
   read the installation instructions, and in
   particular <xref linkend="install-requirements"/> as well.  Also,
   check <xref linkend="regress"/> regarding the
   interpretation of regression test results.
  </para>

  <para>
   Platforms that are not covered here have no known platform-specific
   installation issues.
  </para>

  <sect2 id="installation-notes-cygwin">
   <title>Cygwin</title>

   <indexterm zone="installation-notes-cygwin">
    <primary>Cygwin</primary>
    <secondary>installation on</secondary>
   </indexterm>

   <para>
    PostgreSQL can be built using Cygwin, a Linux-like environment for
    Windows, but that method is inferior to the native Windows build
    and running a server under Cygwin is no longer recommended.
   </para>

   <para>
    When building from source, proceed according to the Unix-style
    installation procedure (i.e., <literal>./configure;
    make</literal>; etc.), noting the following Cygwin-specific
    differences:

    <itemizedlist>
     <listitem>
      <para>
       Set your path to use the Cygwin bin directory before the
       Windows utilities.  This will help prevent problems with
       compilation.
      </para>
     </listitem>

     <listitem>
      <para>
       The <command>adduser</command> command is not supported; use
       the appropriate user management application on Windows.
       Otherwise, skip this step.
      </para>
     </listitem>

     <listitem>
      <para>
       The <command>su</command> command is not supported; use ssh to
       simulate su on Windows. Otherwise, skip this step.
      </para>
     </listitem>

     <listitem>
      <para>
       <productname>OpenSSL</productname> is not supported.
      </para>
     </listitem>

     <listitem>
      <para>
       Start <command>cygserver</command> for shared memory support.
       To do this, enter the command <literal>/usr/sbin/cygserver
       &amp;</literal>.  This program needs to be running anytime you
       start the PostgreSQL server or initialize a database cluster
       (<command>initdb</command>).  The
       default <command>cygserver</command> configuration may need to
       be changed (e.g., increase <symbol>SEMMNS</symbol>) to prevent
       PostgreSQL from failing due to a lack of system resources.
      </para>
     </listitem>

     <listitem>
      <para>
        Building might fail on some systems where a locale other than
        C is in use. To fix this, set the locale to C by doing
        <command>export LANG=C.utf8</command> before building, and then
        setting it back to the previous setting after you have installed
        PostgreSQL.
      </para>
     </listitem>

     <listitem>
      <para>
       The parallel regression tests (<literal>make check</literal>)
       can generate spurious regression test failures due to
       overflowing the <function>listen()</function> backlog queue
       which causes connection refused errors or hangs.  You can limit
       the number of connections using the make
       variable <varname>MAX_CONNECTIONS</varname> thus:
<programlisting>
make MAX_CONNECTIONS=5 check
</programlisting>
       (On some systems you can have up to about 10 simultaneous
       connections.)
      </para>
     </listitem>
    </itemizedlist>
   </para>

   <para>
    It is possible to install <command>cygserver</command> and the
    PostgreSQL server as Windows NT services.  For information on how
    to do this, please refer to the <filename>README</filename>
    document included with the PostgreSQL binary package on Cygwin.
    It is installed in the
    directory <filename>/usr/share/doc/Cygwin</filename>.
   </para>
  </sect2>

Title: PostgreSQL Installation Notes for Cygwin
Summary
PostgreSQL can be built and installed on Cygwin, a Linux-like environment for Windows, but it is not recommended to run a server under Cygwin due to limitations and potential issues, and instead, a native Windows build is preferred; the section provides specific instructions and notes for building and installing PostgreSQL on Cygwin.