~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/installation.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $ -->
2
2
 
3
3
<chapter id="installation">
4
4
 <title><![%standalone-include[<productname>PostgreSQL</>]]>
85
85
 
86
86
    <listitem>
87
87
     <para>
88
 
      You need an <acronym>ISO</>/<acronym>ANSI</> C compiler (minimum
 
88
      You need an <acronym>ISO</>/<acronym>ANSI</> C compiler (at least
89
89
      C89-compliant). Recent
90
90
      versions of <productname>GCC</> are recommendable, but
91
91
      <productname>PostgreSQL</> is known to build using a wide variety
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
294
294
      </indexterm>
295
295
 
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.
302
302
     </para>
303
303
    </listitem>
 
304
    <listitem>
 
305
     <para>
 
306
      <indexterm>
 
307
       <primary>perl</primary>
 
308
      </indexterm>
 
309
 
 
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.
 
314
     </para>
 
315
    </listitem>
304
316
   </itemizedlist>
305
317
  </para>
306
318
 
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
425
 
     might find that:
 
437
     might find that this works:
426
438
<screen>
427
439
<userinput>/etc/rc.d/init.d/postgresql stop</userinput>
428
440
</screen>
429
 
     works.
430
441
    </para>
431
442
   </step>
432
443
 
471
482
 
472
483
   <step>
473
484
    <para>
474
 
     Start the database server, again the special database user
 
485
     Start the database server, again using the special database user
475
486
     account:
476
487
<programlisting>
477
488
<userinput>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</>
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.)
1654
1665
   </para>
1675
1686
   </indexterm>
1676
1687
 
1677
1688
   <para>
1678
 
    On several systems with shared libraries
 
1689
    On some systems with shared libraries
1679
1690
    you need to tell the system how to find the newly installed
1680
1691
    shared libraries.  The systems on which this is
1681
1692
    <emphasis>not</emphasis> necessary include <systemitem
2053
2064
   </indexterm>
2054
2065
 
2055
2066
   <para>
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.
2063
2074
 
2064
2075
   <para>
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>.
2069
2080
   </para>
2085
2096
    <ulink url="http://www.han.de/~jum/aix/ldd.c"></ulink>.
2086
2097
   </para>
2087
2098
 
2088
 
   <sect3>
2089
 
    <title>AIX 4.3.2</title>
2090
 
 
2091
 
    <para>
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:
2094
 
<screen>
2095
 
$ lslpp -l bos.adt.libm
2096
 
</screen>
2097
 
    </para>
2098
 
   </sect3>
 
2099
   <para>
 
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.
 
2104
   </para>
 
2105
 
 
2106
   <table id="AIX-fixlevels">
 
2107
    <title>
 
2108
     Minimum recommended <systemitem class="osname">AIX</systemitem> fix levels
 
2109
    </title>
 
2110
 
 
2111
    <tgroup cols="2">
 
2112
     <thead>
 
2113
      <row>
 
2114
       <entry>AIX version</entry>
 
2115
       <entry>fix level</entry>
 
2116
      </row>
 
2117
     </thead>
 
2118
 
 
2119
     <tbody>
 
2120
      <row>
 
2121
       <entry>AIX 4.3.3</entry>
 
2122
       <entry>Maintenance Level 11 + post ML11 bundle</entry>
 
2123
      </row>
 
2124
 
 
2125
      <row>
 
2126
       <entry>AIX 5.1</entry>
 
2127
       <entry>Maintenance Level 9 + post ML9 bundle</entry>
 
2128
      </row>
 
2129
 
 
2130
      <row>
 
2131
       <entry>AIX 5.2</entry>
 
2132
       <entry>Technology Level 10 Service Pack 3</entry>
 
2133
      </row>
 
2134
 
 
2135
      <row>
 
2136
       <entry>AIX 5.3</entry>
 
2137
       <entry>Technology Level 7</entry>
 
2138
      </row>
 
2139
 
 
2140
      <row>
 
2141
       <entry>AIX 6.1</entry>
 
2142
       <entry>Base Level</entry>
 
2143
      </row>
 
2144
     </tbody>
 
2145
    </tgroup>
 
2146
   </table>
2099
2147
 
2100
2148
   <sect3>
2101
2149
    <title>GCC issues</title>
2120
2168
 
2121
2169
    <para>
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
2133
2181
 
2134
2182
    <para>
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>.
2141
 
    </para>
2142
 
   </sect3>
2143
 
 
2144
 
   <sect3>
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.
 
2189
    </para>
 
2190
   </sect3>
 
2191
 
 
2192
   <sect3>
 
2193
    <title>Internet address issues</title>
 
2194
 
 
2195
    <para>
 
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.
 
2202
    </para>
 
2203
 
 
2204
    <!-- http://archives.postgresql.org/message-id/6064jt6cfm.fsf_-_@dba2.int.libertyrms.com -->
 
2205
 
 
2206
    <para>
 
2207
     One user reports:
 
2208
    </para>
 
2209
 
 
2210
    <para>
 
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.
 
2217
    </para>
 
2218
 
 
2219
    <para>
 
2220
     Any of the following actions <quote>fix</quote> the problem.
 
2221
     <itemizedlist>
 
2222
      <listitem>
 
2223
       <para>
 
2224
        Delete the IPv6 address for localhost:
 
2225
<screen>
 
2226
(as root)
 
2227
# ifconfig lo0 inet6 ::1/0 delete
 
2228
</screen>
 
2229
       </para>
 
2230
      </listitem>
 
2231
 
 
2232
      <listitem>
 
2233
       <para>
 
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:
 
2238
<programlisting>
 
2239
hosts=local,bind
 
2240
</programlisting>
 
2241
        Replace this with:
 
2242
<programlisting>
 
2243
hosts=local4,bind4
 
2244
</programlisting>
 
2245
        to deactivate searching for IPv6 addresses.
 
2246
       </para>
 
2247
      </listitem>
 
2248
     </itemizedlist>
 
2249
    </para>
 
2250
   </sect3>
 
2251
 
 
2252
   <sect3>
 
2253
    <title>Memory management</title>
2146
2254
    <!-- http://archives.postgresql.org/message-id/603bgqmpl9.fsf@dba2.int.libertyrms.com -->
2147
2255
 
2148
2256
    <para>
2292
2400
     </biblioentry>
2293
2401
    </bibliography>
2294
2402
   </sect3>
2295
 
 
2296
 
   <sect3>
2297
 
    <title>Statistics Collector Issues</title>
2298
 
    <!-- http://archives.postgresql.org/message-id/6064jt6cfm.fsf_-_@dba2.int.libertyrms.com -->
2299
 
 
2300
 
    <para>
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.
2307
 
    </para>
2308
 
 
2309
 
    <para>
2310
 
     Any of the following actions <quote>fix</quote> the problem.
2311
 
     <itemizedlist>
2312
 
      <listitem>
2313
 
       <para>
2314
 
        Delete the IPv6 address for localhost:
2315
 
<screen>
2316
 
(as root)
2317
 
# ifconfig lo0 inet6 ::1/0 delete
2318
 
</screen>
2319
 
       </para>
2320
 
      </listitem>
2321
 
 
2322
 
      <listitem>
2323
 
       <para>
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:
2328
 
<programlisting>
2329
 
hosts=local,bind
2330
 
</programlisting>
2331
 
        Replace this with:
2332
 
<programlisting>
2333
 
hosts=local4,bind4
2334
 
</programlisting>
2335
 
        to deactivate searching for IPv6 addresses.
2336
 
       </para>
2337
 
      </listitem>
2338
 
     </itemizedlist>
2339
 
    </para>
2340
 
   </sect3>
2341
2403
  </sect2>
2342
2404
 
2343
2405
  <sect2 id="installation-notes-cygwin">