summaryrefslogtreecommitdiff
path: root/doc/FAQ_MSWIN
blob: d753fedd5f8e4c8b3d3089b22e982094b3ed7824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
How to install PostgreSQL on Windows
====================================

$Date: 2004/03/05 19:57:20 $

PostgreSQL requires the appropriate subset of Cygwin DLLs to be
installed in order that it functions under Windows.

This document assumes that you do not have Cygwin already installed
on your system.  If that is not the case, then you will need to
adjust these instructions accordingly.

1.  Download and run the Cygwin installer.  Visit http://cygwin.com/ and
    click on the "Install Cygwin now' link.  This will prompt you
    to download a "setup.exe".  Save this file somewhere on your
    system and then execute it.

2.  Proceed through the Cygwin install wizard.  Choose 'Install from
    Internet', specify a Local Package Directory and choose a mirror
    site that's close to you.  Answer the other installer questions
    appropriately for your configuration.

    When you come to the point of choosing which packages to install,
    expand the 'Database' section and click 'Skip' next to PostgreSQL
    to change it to the latest version of PostgreSQL available for
    Cygwin.

3.  Once the download and install process is complete, open a Cygwin
    shell and do the following for a basic installation:

    3a.  Start ipc-daemon2 for shared memory support.  To do this,
         enter the command "ipc-daemon2 &".  This program
         needs to be running anytime you start the PostgreSQL server
         (postmaster) or initialize a database (initdb).

    3b.  Use the initdb command to create a new database cluster.  An
         example command would be:

            initdb -D /usr/local/pgsql/data -W -E LATIN1

         Which will create a cluster in the /usr/local/pgsql/data
         directory, will prompt for a superuser password and will
         set the default database encoding to LATIN1.

    3c.  Start up the postmaster.  Use a command similar to the
         following:

            postmaster -D /usr/local/pgsql/data

         This will start the postmaster, and if successful you will
         see some initial log entries, and an entry "LOG: database
         system is ready".

4.  You are now running a PostgreSQL server on your Windows machine.

5.  It is possible to install ipc-daemon2 and the postmaster as
    Windows NT services.  For information on how to do this, please
    refer to the README document included with Cygwin PostgreSQL.  It
    is installed in the /usr/share/doc/Cygwin directory.

Building from source
--------------------

There are some points that are only relevant if you are building Cygwin
PostgreSQL from source:

1.  Set your path to use the Cygwin bin directory before the Windows
    utilities.  This will help prevent problems with compilation.

2.  Proceed according to the INSTALL file (i.e., ./configure; make; etc.)
    noting the following Cygwin specific differences:

        o The GNU make command is called "make" not "gmake".
        o The adduser command is not supported -- use the appropriate
          user management application on Windows NT, 2000, or XP.
          Otherwise, skip this step.
        o The su command is not supported -- use ssh to simulate su
          on Windows NT, 2000, or XP. Otherwise, skip this step.

    Alternatively, proceed according to the README file supplied with
    the Cygwin PostgreSQL package.

Known issues
------------

1.  Cygwin's AF_UNIX sockets are really implemented as AF_INET sockets
    so they are inherently insecure.

2.  "make check" can generate spurious regression test failures due to
    overflowing the listen() backlog queue which causes connection
    refused errors or hangs. You can limit the number of connections
    using the MAX_CONNECTIONS option thus:

       make MAX_CONNECTIONS=5 check

    (On some systems you can have up to about 10 simultaneous connections).

Problem reports can be sent to pgsql-cygwin@postgresql.org.