Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit abcc4b9

Browse files
committed
I have attached a more comprehensive MSWIN FAQ patch. Basically, the
instructions were way out of date and incorrect. Installing Postgres from Cygwin is easier these days than the FAQ would imply. This patch already includes Andrew's previous patch. Christopher Kings-Lynne
1 parent db1d3e7 commit abcc4b9

File tree

1 file changed

+62
-26
lines changed

1 file changed

+62
-26
lines changed

doc/FAQ_MSWIN

+62-26
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,67 @@
11
How to install PostgreSQL on Windows
22
====================================
3-
$Date: 2002/11/11 20:04:05 $
3+
$Date: 2003/11/09 03:47:51 $
44

5-
1. Install the latest Cygwin package, available at http://cygwin.com/.
6-
The Cygwin package provides a UNIX-like API on top of the Win32
7-
API.
5+
PostgreSQL requires the Cygwin set of libraries to be installed in
6+
order that it functions under Windows.
87

9-
A pre-built PostgreSQL is part of the standard Cygwin distribution
10-
and is installed by Cygwin's setup.exe. You are encouraged to use
11-
this version unless it does not meet your needs. Please read the
12-
README file, /usr/doc/Cygwin/postgresql-${version}.README, where
13-
"${version}" is the version (e.g., 7.2).
8+
This document assumes that you do not have Cygwin already installed
9+
on your system. If that is not the case, then you will need to
10+
adjust these instructions accordingly.
1411

15-
2. Install the latest cygipc package, available at
16-
http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/.
17-
Do not use versions prior to 1.04, they will not work.
12+
1. Download and run the Cygwin installer. Visit http://cygwin.com/ and
13+
click on the "Install Cygwin now' link. This will prompt you
14+
to download a "setup.exe". Save this file somewhere on your
15+
system and then execute it.
1816

19-
Use the following command to install the cygipc package:
17+
2. Proceed through the Cygwin install wizard. Choose 'Install from
18+
Internet', specify a Local Package Directory and choose a mirror
19+
site that's close to you. Leave everything else as-is.
2020

21-
$ tar -C / -xjf cygipc-${version}.tar.bz2
21+
When you come to the point of choosing which packages to install,
22+
expand the 'Database' section and click 'Skip' next to PostgreSQL
23+
to change it to the latest version of PostgreSQL available for
24+
Cygwin.
2225

23-
where "${version}" is the version (e.g., 1.11-1).
26+
3. Once the download and install process is complete, open a Cygwin
27+
shell and do the following:
2428

25-
3. The Cygwin bin directory has to be placed in the path before the
26-
Windows program directories, because the sort.exe has to be taken
27-
from Cygwin, not Windows.
29+
3a. Start ipc-daemon2 for shared memory support. Use
30+
"net start ipc-daemon2", if you want ipc-daemon2 installed
31+
as a service; otherwise, use "ipc-daemon2 &". This program
32+
needs to be running anytime you start the PostgreSQL server
33+
(postmaster) or initialize a database (initdb).
2834

29-
4. Start ipc-daemon from the cygipc package. Use "net start ipc-daemon",
30-
if ipc-daemon is installed as a service; otherwise, use "ipc-daemon &".
31-
This program needs to be running anytime you start the PostgreSQL
32-
server (postmaster) or initialize a database (initdb).
35+
3b. Use the initdb command to create a new database cluster. An
36+
example command would be:
3337

34-
5. Proceed according to the INSTALL file (i.e., ./configure; make; etc.)
38+
initdb -D /usr/local/pgsql/data -W -E LATIN1
39+
40+
Which will create a cluster in the /usr/local/pgsql/data
41+
directory, will prompt for a superuser password and will
42+
set the default database encoding to LATIN1.
43+
44+
3c. Start up the postmaster. Use a command similar to the
45+
following:
46+
47+
postmaster -D /usr/local/pgsql/data
48+
49+
This will start the postmaster, and if successful you will
50+
see some initial log entries, and an entry "LOG: database
51+
system is ready".
52+
53+
4. You are now running a PostgreSQL server on your Windows machine.
54+
55+
Building from source
56+
--------------------
57+
58+
There are some points that are only relevant if you are building Cygwin
59+
PostgreSQL from source:
60+
61+
1. Set your path to use the Cygwin bin directory before the Windows
62+
utilities. Cygwin sort must be used in preference to Windows sort.exe.
63+
64+
2. Proceed according to the INSTALL file (i.e., ./configure; make; etc.)
3565
noting the following Cygwin specific differences:
3666

3767
o The GNU make command is called "make" not "gmake".
@@ -44,13 +74,19 @@ $Date: 2002/11/11 20:04:05 $
4474
Alternatively, proceed according to the README file supplied with
4575
the Cygwin PostgreSQL package.
4676

47-
NOTE: The following are known issues with PostgreSQL on Windows:
77+
Known issues
78+
------------
4879

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

52-
2. make check can generate spurious regression test failures due to
83+
2. "make check" can generate spurious regression test failures due to
5384
overflowing the listen() backlog queue which causes connection
54-
refused errors.
85+
refused errors or hangs. You can limit the number of connections
86+
using the MAX_CONNECTIONS option thus:
87+
88+
make MAX_CONNECTIONS=5 check
89+
90+
(On some systems you can have up to about 10 simultaneous connections).
5591

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

0 commit comments

Comments
 (0)