]> granicus.if.org Git - postgresql/blob - doc/FAQ_CYGWIN
Un-break plperl for non-set case.
[postgresql] / doc / FAQ_CYGWIN
1 Installing PostgreSQL on Windows Using Cygwin FAQ
2 =================================================
3
4 $Date: 2004/10/15 16:18:35 $
5
6 PostgreSQL requires the appropriate subset of Cygwin DLLs to be
7 installed in order that it functions under Windows.
8
9 This document assumes that you do not have Cygwin already installed
10 on your system.  If that is not the case, then you will need to
11 adjust these instructions accordingly.
12
13 1.  Download and run the Cygwin installer.  Visit http://cygwin.com/ and
14     click on the "Install Cygwin now' link.  This will prompt you
15     to download a "setup.exe".  Save this file somewhere on your
16     system and then execute it.
17
18 2.  Proceed through the Cygwin install wizard.  Choose 'Install from
19     Internet', specify a Local Package Directory and choose a mirror
20     site that's close to you.  Answer the other installer questions
21     appropriately for your configuration.
22
23     When you come to the point of choosing which packages to install,
24     expand the 'Database' section and click 'Skip' next to PostgreSQL
25     to change it to the latest version of PostgreSQL available for
26     Cygwin.
27
28 3.  Once the download and install process is complete, open a Cygwin
29     shell and do the following for a basic installation:
30
31     3a.  Start cygserver for shared memory support.  To do this,
32          enter the command "/usr/sbin/cygserver &".  This program
33          needs to be running anytime you start the PostgreSQL server
34          (postmaster) or initialize a database (initdb).
35
36     3b.  Use the initdb command to create a new database cluster.  An
37          example command would be:
38
39             initdb -D /usr/local/pgsql/data -W -E LATIN1
40
41          Which will create a cluster in the /usr/local/pgsql/data
42          directory, will prompt for a superuser password and will
43          set the default database encoding to LATIN1.
44
45     3c.  Start up the postmaster.  Use a command similar to the
46          following:
47
48             postmaster -D /usr/local/pgsql/data
49
50          This will start the postmaster, and if successful you will
51          see some initial log entries, and an entry "LOG: database
52          system is ready".
53
54 4.  You are now running a PostgreSQL server on your Windows machine.
55
56 5.  It is possible to install cygserver and the postmaster as
57     Windows NT services.  For information on how to do this, please
58     refer to the README document included with Cygwin PostgreSQL.  It
59     is installed in the /usr/share/doc/Cygwin directory.
60
61 Building from source
62 --------------------
63
64 There are some points that are only relevant if you are building Cygwin
65 PostgreSQL from source:
66
67 1.  Set your path to use the Cygwin bin directory before the Windows
68     utilities.  This will help prevent problems with compilation.
69
70 2.  Proceed according to the INSTALL file (i.e., ./configure; make; etc.)
71     noting the following Cygwin specific differences:
72
73         o The GNU make command is called "make" not "gmake".
74         o The adduser command is not supported -- use the appropriate
75           user management application on Windows NT, 2000, or XP.
76           Otherwise, skip this step.
77         o The su command is not supported -- use ssh to simulate su
78           on Windows NT, 2000, or XP. Otherwise, skip this step.
79
80     Alternatively, proceed according to the README file supplied with
81     the Cygwin PostgreSQL package.
82
83 Known issues
84 ------------
85
86 1.  Cygwin's AF_UNIX sockets are really implemented as AF_INET sockets
87     so they are inherently insecure.
88
89 2.  "make check" can generate spurious regression test failures due to
90     overflowing the listen() backlog queue which causes connection
91     refused errors or hangs. You can limit the number of connections
92     using the MAX_CONNECTIONS option thus:
93
94        make MAX_CONNECTIONS=5 check
95
96     (On some systems you can have up to about 10 simultaneous connections).
97
98 3.  The default cygserver configuration may need to be changed (e.g.,
99     increase SEMMNS) to prevent PostgreSQL from failing due to a lack of
100     system resources.
101
102 Problem reports can be sent to pgsql-cygwin@postgresql.org.