1
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.321 2009/04/27 16:27:35 momjian Exp $ -->
1
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.325 2009/06/23 03:46:00 tgl Exp $ -->
3
3
<chapter id="installation">
4
4
<title><![%standalone-include[<productname>PostgreSQL</>]]>
118
118
command you type, and allows you to use arrow keys to recall and
119
119
edit previous commands. This is very helpful and is strongly
120
120
recommended. If you don't want to use it then you must specify
121
the <option>--without-readline</option> option of
121
the <option>--without-readline</option> option to
122
122
<filename>configure</>. As an alternative, you can often use the
123
123
BSD-licensed <filename>libedit</filename> library, originally
124
124
developed on <productname>NetBSD</productname>. The
296
296
GNU <application>Flex</> and <application>Bison</>
297
are needed to build a CVS checkout or if you changed the actual
297
are needed to build from a CVS checkout, or if you changed the actual
298
298
scanner and parser definition files. If you need them, be sure
299
299
to get <application>Flex</> 2.5.4 or later and
300
300
<application>Bison</> 1.875 or later. Other <application>lex</>
301
301
and <application>yacc</> programs cannot be used.
307
<primary>perl</primary>
310
<application>Perl</> is also needed to build from a CVS checkout,
311
or if you changed the input files for any of the build steps that
312
use Perl scripts. If building on Windows you will need
313
<application>Perl</> in any case.
422
434
On systems that have <productname>PostgreSQL</> started at boot time,
423
435
there is probably a start-up file that will accomplish the same thing. For
424
436
example, on a <systemitem class="osname">Red Hat Linux</> system one
437
might find that this works:
427
439
<userinput>/etc/rc.d/init.d/postgresql stop</userinput>
1648
1659
later on. To reset the source tree to the state in which it was
1649
1660
distributed, use <command>gmake distclean</>. If you are going to
1650
1661
build for several platforms within the same source tree you must do
1651
this and rebuild for each platform. (Alternatively, use
1662
this and re-configure for each platform. (Alternatively, use
1652
1663
a separate build tree for each platform, so that the source tree
1653
1664
remains unmodified.)
2056
PostgreSQL on AIX works, but getting it installed properly can be
2057
challenging. Both AIX version 4.3 and 5.3 are supported in
2058
theory. You can use GCC or the native IBM compiler xlc. In
2067
PostgreSQL works on AIX, but getting it installed properly can be
2068
challenging. AIX versions from 4.3.3 to 6.1 are considered supported.
2069
You can use GCC or the native IBM compiler xlc. In
2059
2070
general, using recent versions of AIX and PostgreSQL helps. Check
2060
2071
the build farm for up to date information about which versions of
2061
2072
AIX are known to work.
2065
2076
Use the following <command>configure</command> flags in addition
2066
to your own if you have Readline or libz
2077
to your own if you have installed Readline or libz
2067
2078
there: <literal>--with-includes=/usr/local/include
2068
2079
--with-libraries=/usr/local/lib</literal>.
2085
2096
<ulink url="http://www.han.de/~jum/aix/ldd.c"></ulink>.
2089
<title>AIX 4.3.2</title>
2092
On AIX 4.3.2, you need <filename>libm.a</filename> that is in the
2093
fileset bos.adt.libm. Try the following command:
2095
$ lslpp -l bos.adt.libm
2100
<xref linkend="AIX-fixlevels"> shows the minimum recommended fix levels
2101
for various AIX versions. To check your current fix level, use
2102
<command>oslevel -r</command> in AIX 4.3.3 to AIX 5.2 ML 7, or
2103
<command>oslevel -s</command> in later versions.
2106
<table id="AIX-fixlevels">
2108
Minimum recommended <systemitem class="osname">AIX</systemitem> fix levels
2114
<entry>AIX version</entry>
2115
<entry>fix level</entry>
2121
<entry>AIX 4.3.3</entry>
2122
<entry>Maintenance Level 11 + post ML11 bundle</entry>
2126
<entry>AIX 5.1</entry>
2127
<entry>Maintenance Level 9 + post ML9 bundle</entry>
2131
<entry>AIX 5.2</entry>
2132
<entry>Technology Level 10 Service Pack 3</entry>
2136
<entry>AIX 5.3</entry>
2137
<entry>Technology Level 7</entry>
2141
<entry>AIX 6.1</entry>
2142
<entry>Base Level</entry>
2101
2149
<title>GCC issues</title>
2122
2170
AIX 5.3 has a problem
2123
where <structname>sockadr_storage</structname> is not defined to
2171
where <structname>sockaddr_storage</structname> is not defined to
2124
2172
be large enough. In version 5.3, IBM increased the size of
2125
2173
<structname>sockaddr_un</structname>, the address structure for
2126
2174
Unix-domain sockets, but did not correspondingly increase the
2127
size of <structname>sockadr_storage</structname>. The result of
2175
size of <structname>sockaddr_storage</structname>. The result of
2128
2176
this is that attempts to use Unix-domain sockets with PostgreSQL
2129
2177
lead to libpq overflowing the data structure. TCP/IP connections
2130
2178
work OK, but not Unix-domain sockets, which prevents the
2135
2183
The problem was reported to IBM, and is recorded as bug report
2136
PMR29657. If you upgrade to maintenance level 5300-03, that will
2137
include this fix. Use the command <literal>oslevel -r</literal>
2138
to determine what maintenance level you are at. An immediate
2139
resolution is to alter <symbol>_SS_MAXSIZE</symbol> to = 1025 in
2140
<filename>/usr/include/sys/socket.h</filename>.
2145
<title>Memory Management</title>
2184
PMR29657. If you upgrade to maintenance level 5300-03 or later,
2185
that will include this fix. A quick workaround
2186
is to alter <symbol>_SS_MAXSIZE</symbol> to 1025 in
2187
<filename>/usr/include/sys/socket.h</filename>. In either case,
2188
recompile PostgreSQL once you have the corrected header file.
2193
<title>Internet address issues</title>
2196
PostgreSQL relies on the system's <function>getaddrinfo</> function
2197
to parse IP addresses in <varname>listen_addresses</>,
2198
<filename>pg_hba.conf</>, etc. Older versions of AIX have assorted
2199
bugs in this function. If you have problems related to these settings,
2200
updating to the appropriate fix level shown in <xref
2201
linkend="AIX-fixlevels"> should take care of it.
2204
<!-- http://archives.postgresql.org/message-id/6064jt6cfm.fsf_-_@dba2.int.libertyrms.com -->
2211
When implementing PostgreSQL version 8.1 on AIX 5.3, we
2212
periodically ran into problems where the statistics collector
2213
would <quote>mysteriously</quote> not come up successfully. This
2214
appears to be the result of unexpected behaviour in the IPv6
2215
implementation. It looks like PostgreSQL and IPv6 do not play
2216
very well together at this time on AIX.
2220
Any of the following actions <quote>fix</quote> the problem.
2224
Delete the IPv6 address for localhost:
2227
# ifconfig lo0 inet6 ::1/0 delete
2234
Remove IPv6 from net services. The
2235
file <filename>/etc/netsvc.conf</filename> on AIX is roughly
2236
equivalent to <filename>/etc/nsswitch.conf</filename> on
2237
Solaris/Linux. The default, on AIX, is thus:
2245
to deactivate searching for IPv6 addresses.
2253
<title>Memory management</title>
2146
2254
<!-- http://archives.postgresql.org/message-id/603bgqmpl9.fsf@dba2.int.libertyrms.com -->
2293
2401
</bibliography>
2297
<title>Statistics Collector Issues</title>
2298
<!-- http://archives.postgresql.org/message-id/6064jt6cfm.fsf_-_@dba2.int.libertyrms.com -->
2301
When implementing PostgreSQL version 8.1 on AIX 5.3, we
2302
periodically ran into problems where the statistics collector
2303
would <quote>mysteriously</quote> not come up successfully. This
2304
appears to be the result of unexpected behaviour in the IPv6
2305
implementation. It looks like PostgreSQL and IPv6 do not play
2306
very well together at this time on AIX.
2310
Any of the following actions <quote>fix</quote> the problem.
2314
Delete the IPv6 address for localhost:
2317
# ifconfig lo0 inet6 ::1/0 delete
2324
Remove IPv6 from net services. The
2325
file <filename>/etc/netsvc.conf</filename> on AIX is roughly
2326
equivalent to <filename>/etc/nsswitch.conf</filename> on
2327
Solaris/Linux. The default, on AIX, is thus:
2335
to deactivate searching for IPv6 addresses.
2343
2405
<sect2 id="installation-notes-cygwin">