]> granicus.if.org Git - postgresql/blob - doc/src/sgml/installation.sgml
Update supported platforms list.
[postgresql] / doc / src / sgml / installation.sgml
1 <!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.226 2005/01/10 09:01:04 petere Exp $ -->
2
3 <chapter id="installation">
4  <title><![%standalone-include[<productname>PostgreSQL</>]]>
5   Installation Instructions</title>
6
7  <indexterm zone="installation">
8   <primary>installation</primary>
9  </indexterm>
10
11  <para>
12   This <![%standalone-include;[document]]>
13   <![%standalone-ignore;[chapter]]> describes the installation of
14   <productname>PostgreSQL</productname> from the source code
15   distribution.  (If you are installing a pre-packaged distribution,
16   such as an RPM or Debian package, ignore this
17   <![%standalone-include;[document]]>
18   <![%standalone-ignore;[chapter]]>
19   and read the packager's instructions instead.)
20  </para>
21
22  <sect1 id="install-short">
23   <title>Short Version</title>
24
25   <para>
26 <synopsis>
27 ./configure
28 gmake
29 su
30 gmake install
31 adduser postgres
32 mkdir /usr/local/pgsql/data
33 chown postgres /usr/local/pgsql/data
34 su - postgres
35 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
36 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
37 /usr/local/pgsql/bin/createdb test
38 /usr/local/pgsql/bin/psql test
39 </synopsis>
40    The long version is the rest of this
41    <![%standalone-include;[document.]]>
42    <![%standalone-ignore;[chapter.]]>
43   </para>
44  </sect1>
45
46
47  <sect1 id="install-requirements">
48   <title>Requirements</title>
49
50   <para>
51    In general, a modern Unix-compatible platform should be able to run
52    <productname>PostgreSQL</>.
53     The platforms that had received specific testing at the
54    time of release are listed in <xref linkend="supported-platforms">
55    below. In the <filename>doc</> subdirectory of the distribution
56    there are several platform-specific <acronym>FAQ</> documents you
57    might wish to consult if you are having trouble.
58   </para>
59
60   <para>
61    The following software packages are required for building
62    <productname>PostgreSQL</>:
63
64    <itemizedlist>
65     <listitem>
66      <para>
67       <indexterm>
68        <primary>make</primary>
69       </indexterm>
70
71       <acronym>GNU</> <application>make</> is required; other
72       <application>make</> programs will <emphasis>not</> work.
73       <acronym>GNU</> <application>make</> is often installed under
74       the name <filename>gmake</filename>; this document will always
75       refer to it by that name. (On some systems
76       <acronym>GNU</acronym> <application>make</> is the default tool with the name
77       <filename>make</>.) To test for <acronym>GNU</acronym>
78       <application>make</application> enter
79 <screen>
80 <userinput>gmake --version</userinput>
81 </screen>
82       It is recommended to use version 3.76.1 or later.
83      </para>
84     </listitem>
85
86     <listitem>
87      <para>
88       You need an <acronym>ISO</>/<acronym>ANSI</> C compiler. Recent
89       versions of <productname>GCC</> are recommendable, but
90       <productname>PostgreSQL</> is known to build with a wide variety
91       of compilers from different vendors.
92      </para>
93     </listitem>
94
95     <listitem>
96      <para>
97       <application>gzip</> is needed to unpack the distribution in the
98       first place.<![%standalone-include;[  If you are reading this, you probably already got
99       past that hurdle.]]>
100      </para>
101     </listitem>
102
103     <listitem>
104      <para>
105       <indexterm>
106        <primary>readline</primary>
107       </indexterm>
108
109       The <acronym>GNU</> <productname>Readline</> library (for
110       comfortable line editing and command history retrieval) will be
111       used by default.  If you don't want to use it then you must
112       specify the <option>--without-readline</option> option for
113       <filename>configure</>.  (On <productname>NetBSD</productname>,
114       the <filename>libedit</filename> library is
115       <productname>Readline</productname>-compatible and is used if
116       <filename>libreadline</filename> is not found.)  If you are using
117       a package-based Linux distribution, be aware that you need both
118       the <literal>readline</> and <literal>readline-devel</> packages,
119       if those are separate in your distribution.
120      </para>
121     </listitem>
122
123     <listitem>
124      <para>
125       <indexterm>
126        <primary>installation</primary>
127        <secondary>on Windows</secondary>
128       </indexterm>
129
130       Additional software is needed to build
131       <productname>PostgreSQL</productname> on <productname>Windows</>.
132       You can build <productname>PostgreSQL</productname> for
133       <productname>NT</>-based versions of <productname>Windows</>
134       (like Windows XP and 2003) using <productname>MinGW</productname>;
135       see <filename>doc/FAQ_MINGW</> for details.  You can also build
136       <productname>PostgreSQL</productname> using
137       <productname>Cygwin</productname>; see <filename>doc/FAQ_CYGWIN</>.
138       A <productname>Cygwin</productname>-based build will work on older
139       versions of <productname>Windows</>, but if you have a choice,
140       we recommend the <productname>MinGW</productname> approach.
141       While these are the only tool sets recommended for a complete build,
142       it is possible to build just the C client library
143       (<application>libpq</application>) and the interactive terminal
144       (<application>psql</application>) using other <productname>Windows</>
145       tool sets.  For details of that see
146       <![%standalone-include[the documentation chapter "Client-Only
147       Installation on Windows"]]> <![%standalone-ignore[<xref
148       linkend="install-win32">]]>.
149      </para>
150     </listitem>
151    </itemizedlist>
152   </para>
153
154   <para>
155    The following packages are optional.  They are not required in the
156    default configuration, but they are needed when certain build
157    options are enabled, as explained below.
158
159    <itemizedlist>
160     <listitem>
161      <para>
162       To build the server programming language
163       <application>PL/Perl</application> you need a full
164       <productname>Perl</productname> installation, including the
165       <filename>libperl</filename> library and the header files.
166       Since <application>PL/Perl</application> will be a shared
167       library, the <indexterm><primary>libperl</primary></indexterm>
168       <filename>libperl</filename> library must be a shared library
169       also on most platforms.  This appears to be the default in
170       recent <productname>Perl</productname> versions, but it was not
171       in earlier versions, and in any case it is the choice of whomever
172       installed Perl at your site.
173      </para>
174
175      <para>
176       If you don't have the shared library but you need one, a message
177       like this will appear during the build to point out this fact:
178 <screen>
179 *** Cannot build PL/Perl because libperl is not a shared library.
180 *** You might have to rebuild your Perl installation.  Refer to
181 *** the documentation for details.
182 </screen>
183       (If you don't follow the on-screen output you will merely notice
184       that the <application>PL/Perl</application> library object,
185       <filename>plperl.so</filename> or similar, will not be
186       installed.)  If you see this, you will have to rebuild and
187       install <productname>Perl</productname> manually to be able to
188       build <application>PL/Perl</application>.  During the
189       configuration process for <productname>Perl</productname>,
190       request a shared library.
191      </para>
192     </listitem>
193
194     <listitem>
195      <para>
196       To build the <application>PL/Python</> server programming
197       language, you need a <productname>Python</productname>
198       installation with the header files and the <application>distutils</application> module.
199       The <application>distutils</application> module is included by default with
200       <productname>Python</productname> 1.6 and later; users of
201       earlier versions of <productname>Python</productname> will need
202       to install it.
203      </para>
204
205      <para>
206       Since <application>PL/Python</application> will be a shared
207       library, the <indexterm><primary>libpython</primary></indexterm>
208       <filename>libpython</filename> library must be a shared library
209       also on most platforms.  This is not the case in a default
210       <productname>Python</productname> installation.  If after
211       building and installing you have a file called
212       <filename>plpython.so</filename> (possibly a different
213       extension), then everything went well.  Otherwise you should
214       have seen a notice like this flying by:
215 <screen>
216 *** Cannot build PL/Python because libpython is not a shared library.
217 *** You might have to rebuild your Python installation.  Refer to
218 *** the documentation for details.
219 </screen>
220       That means you have to rebuild (part of) your
221       <productname>Python</productname> installation to supply this
222       shared library.
223      </para>
224
225      <para>
226       If you have problems, run <productname>Python</> 2.3 or later's
227       configure using the <literal>--enable-shared</> flag.  On some
228       operating systems you don't have to build a shared library, but
229       you will have to convince the <productname>PostgreSQL</> build
230       system of this.  Consult the <filename>Makefile</filename> in
231       the <filename>src/pl/plpython</filename> directory for details.
232      </para>
233     </listitem>
234
235     <listitem>
236      <para>
237       If you want to build the <application>PL/Tcl</application>
238       procedural language, you of course need a Tcl installation.
239      </para>
240     </listitem>
241
242     <listitem>
243      <para>
244       To enable Native Language Support (<acronym>NLS</acronym>), that
245       is, the ability to display a program's messages in a language
246       other than English, you need an implementation of the
247       <application>Gettext</> <acronym>API</acronym>.  Some operating
248       systems have this built-in (e.g., <systemitem
249       class="osname">Linux</>, <systemitem class="osname">NetBSD</>,
250       <systemitem class="osname">Solaris</>), for other systems you
251       can download an add-on package from here: <ulink
252       url="http://developer.postgresql.org/~petere/bsd-gettext/" ></ulink>.
253       If you are using the <application>Gettext</> implementation in
254       the <acronym>GNU</acronym> C library then you will additionally
255       need the <productname>GNU Gettext</productname> package for some
256       utility programs.  For any of the other implementations you will
257       not need it.
258      </para>
259     </listitem>
260
261     <listitem>
262      <para>
263       <application>Kerberos</>, <productname>OpenSSL</>, and/or
264       <application>PAM</>, if you want to support authentication or
265       encryption using these services.
266      </para>
267     </listitem>
268    </itemizedlist>
269   </para>
270
271   <para>
272    If you are building from a <acronym>CVS</acronym> tree instead of
273    using a released source package, or if you want to do development,
274    you also need the following packages:
275
276    <itemizedlist>
277     <listitem>
278      <para>
279       <indexterm>
280        <primary>flex</primary>
281       </indexterm>
282       <indexterm>
283        <primary>bison</primary>
284       </indexterm>
285       <indexterm>
286        <primary>yacc</primary>
287       </indexterm>
288
289       GNU <application>Flex</> and <application>Bison</>
290       are needed to build a CVS checkout or if you changed the actual
291       scanner and parser definition files. If you need them, be sure
292       to get <application>Flex</> 2.5.4 or later and
293       <application>Bison</> 1.875 or later. Other <application>yacc</>
294       programs can sometimes be used, but doing so requires extra
295       effort and is not recommended. Other <application>lex</>
296       programs will definitely not work.
297      </para>
298     </listitem>
299    </itemizedlist>
300   </para>
301
302   <para>
303    If you need to get a <acronym>GNU</acronym> package, you can find
304    it at your local <acronym>GNU</acronym> mirror site (see <ulink
305    url="http://www.gnu.org/order/ftp.html"></>
306    for a list) or at <ulink
307    url="ftp://ftp.gnu.org/gnu/"></ulink>.
308   </para>
309
310   <para>
311    Also check that you have sufficient disk space. You will need about
312    65 MB for the source tree during compilation and about 15 MB for
313    the installation directory. An empty database cluster takes about
314    25 MB, databases take about five times the amount of space that a
315    flat text file with the same data would take. If you are going to
316    run the regression tests you will temporarily need up to an extra
317    90 MB. Use the <command>df</command> command to check free disk
318    space.
319   </para>
320  </sect1>
321
322 <![%standalone-ignore;[
323  <sect1 id="install-getsource">
324   <title>Getting The Source</title>
325
326   <para>
327    The <productname>PostgreSQL</> &version; sources can be obtained by
328    anonymous FTP from <ulink
329    url="ftp://ftp.postgresql.org/pub/source/v&version;/postgresql-&version;.tar.gz"></ulink>.
330    Use a mirror if possible. After you have obtained the file, unpack it:
331 <screen>
332 <userinput>gunzip postgresql-&version;.tar.gz</userinput>
333 <userinput>tar xf postgresql-&version;.tar</userinput>
334 </screen>
335    This will create a directory
336    <filename>postgresql-&version;</filename> under the current directory
337    with the <productname>PostgreSQL</> sources.
338    Change into that directory for the rest
339    of the installation procedure.
340   </para>
341  </sect1>
342 ]]>
343
344  <sect1 id="install-upgrading">
345   <title>If You Are Upgrading</title>
346
347   <indexterm zone="install-upgrading">
348    <primary>upgrading</primary>
349   </indexterm>
350
351   <para>
352    The internal data storage format changes with new releases of
353    <productname>PostgreSQL</>. Therefore, if you are upgrading an
354    existing installation that does not have a version number
355    <quote>&majorversion;.x</quote>, you must back up and restore your
356    data as shown here. These instructions assume that your existing
357    installation is under the <filename>/usr/local/pgsql</> directory,
358    and that the data area is in <filename>/usr/local/pgsql/data</>.
359    Substitute your paths appropriately.
360   </para>
361
362   <procedure>
363    <step>
364     <para>
365      Make sure that your database is not updated during or after the
366      backup. This does not affect the integrity of the backup, but the
367      changed data would of course not be included. If necessary, edit
368      the permissions in the file
369      <filename>/usr/local/pgsql/data/pg_hba.conf</> (or equivalent) to
370      disallow access from everyone except you.
371     </para>
372    </step>
373
374    <step>
375     <para>
376      <indexterm>
377       <primary>pg_dumpall</primary>
378       <secondary>use during upgrade</secondary>
379      </indexterm>
380
381      To back up your database installation, type:
382 <screen>
383 <userinput>pg_dumpall &gt; <replaceable>outputfile</></userinput>
384 </screen>
385      If you need to preserve OIDs (such as when using them as
386      foreign keys), then use the <option>-o</option> option when running
387      <application>pg_dumpall</>.
388     </para>
389
390     <para>
391      <application>pg_dumpall</application> does not
392      save large objects.  Check
393      <![%standalone-include[the documentation]]>
394      <![%standalone-ignore[<xref linkend="backup-dump-caveats">]]>
395      if you need to do this.
396     </para>
397
398     <para>
399      To make the backup, you can use the <application>pg_dumpall</application>
400      command from the version you are currently running.  For best
401      results, however, try to use the <application>pg_dumpall</application>
402      command from <productname>PostgreSQL</productname> &version;,
403      since this version contains bug fixes and improvements over older
404      versions.  While this advice might seem idiosyncratic since you
405      haven't installed the new version yet, it is advisable to follow
406      it if you plan to install the new version in parallel with the
407      old version.  In that case you can complete the installation
408      normally and transfer the data later.  This will also decrease
409      the downtime.
410     </para>
411    </step>
412
413    <step>
414     <para>
415      If you are installing the new version at the same location as the
416      old one then shut down the old server, at the latest before you
417      install the new files:
418 <screen>
419 <userinput>pg_ctl stop</>
420 </screen>
421      On systems that have <productname>PostgreSQL</> started at boot time,
422      there is probably a start-up file that will accomplish the same thing. For
423      example, on a <systemitem class="osname">Red Hat Linux</> system one
424      might find that
425 <screen>
426 <userinput>/etc/rc.d/init.d/postgresql stop</userinput>
427 </screen>
428      works.
429     </para>
430
431     <para>
432      Very old versions might not have <application>pg_ctl</>.  If you
433      can't find it or it doesn't work, find out the process ID of the
434      old server, for example by typing
435 <screen>
436 <userinput>ps ax | grep postmaster</userinput>
437 </screen>
438      and signal it to stop this way:
439 <screen>
440 <userinput>kill -INT <replaceable>processID</></userinput>
441 </screen>
442     </para>
443    </step>
444
445    <step>
446     <para>
447      If you are installing in the same place as the old version then
448      it is also a good idea to move the old installation out of the
449      way, in case you have trouble and need to revert to it.
450      Use a command like this:
451 <screen>
452 <userinput>mv /usr/local/pgsql /usr/local/pgsql.old</>
453 </screen>
454     </para>
455    </step>
456   </procedure>
457
458   <para>
459    After you have installed <productname>PostgreSQL</> &version;, create a new database
460    directory and start the new server. Remember that you must execute
461    these commands while logged in to the special database user account
462    (which you already have if you are upgrading).
463 <programlisting>
464 <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
465 <userinput>/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data</>
466 </programlisting>
467    Finally, restore your data with
468 <screen>
469 <userinput>/usr/local/pgsql/bin/psql -d template1 -f <replaceable>outputfile</></userinput>
470 </screen>
471    using the <emphasis>new</> <application>psql</>.
472   </para>
473
474   <para>
475    Further discussion appears in
476    <![%standalone-include[the documentation,]]>
477    <![%standalone-ignore[<xref linkend="migration">,]]>
478    which you are encouraged to read in any case.
479   </para>
480  </sect1>
481
482
483  <sect1 id="install-procedure">
484   <title>Installation Procedure</title>
485
486   <procedure>
487
488   <step id="configure">
489    <title>Configuration</>
490
491    <indexterm zone="configure">
492     <primary>configure</primary>
493    </indexterm>
494
495    <para>
496     The first step of the installation procedure is to configure the
497     source tree for your system and choose the options you would like.
498     This is done by running the <filename>configure</> script. For a
499     default installation simply enter
500 <screen>
501 <userinput>./configure</userinput>
502 </screen>
503     This script will run a number of tests to guess values for various
504     system dependent variables and detect some quirks of your
505     operating system, and finally will create several files in the
506     build tree to record what it found.  (You can also run
507     <filename>configure</filename> in a directory outside the source
508     tree if you want to keep the build directory separate.)
509    </para>
510
511    <para>
512     The default configuration will build the server and utilities, as
513     well as all client applications and interfaces that require only a
514     C compiler. All files will be installed under
515     <filename>/usr/local/pgsql</> by default.
516    </para>
517
518    <para>
519     You can customize the build and installation process by supplying one
520     or more of the following command line options to
521     <filename>configure</filename>:
522
523      <variablelist>
524       <varlistentry>
525        <term><option>--prefix=<replaceable>PREFIX</></option></term>
526        <listitem>
527         <para>
528          Install all files under the directory <replaceable>PREFIX</>
529          instead of <filename>/usr/local/pgsql</filename>. The actual
530          files will be installed into various subdirectories; no files
531          will ever be installed directly into the
532          <replaceable>PREFIX</> directory.
533         </para>
534
535         <para>
536          If you have special needs, you can also customize the
537          individual subdirectories with the following options. However,
538          if you leave these with their defaults, the installation will be
539          relocatable, meaning you can move the directory after
540          installation. (The <literal>man</> and <literal>doc</>
541          locations are not affected by this.)
542         </para>
543
544         <para>
545          For relocatable installs, you might want to use 
546          <filename>configure</filename>'s <literal>--disable-rpath</>
547          option.  Also, you will need to tell the operating system how
548          to find the shared libraries.
549         </para>
550        </listitem>
551       </varlistentry>
552
553       <varlistentry>
554        <term><option>--exec-prefix=<replaceable>EXEC-PREFIX</></option></term>
555        <listitem>
556         <para>
557          You can install architecture-dependent files under a
558          different prefix, <replaceable>EXEC-PREFIX</>, than what
559          <replaceable>PREFIX</> was set to. This can be useful to
560          share architecture-independent files between hosts. If you
561          omit this, then <replaceable>EXEC-PREFIX</> is set equal to
562          <replaceable>PREFIX</> and both architecture-dependent and
563          independent files will be installed under the same tree,
564          which is probably what you want.
565         </para>
566        </listitem>
567       </varlistentry>
568
569       <varlistentry>
570        <term><option>--bindir=<replaceable>DIRECTORY</></option></term>
571        <listitem>
572         <para>
573          Specifies the directory for executable programs. The default
574          is <filename><replaceable>EXEC-PREFIX</>/bin</>, which
575          normally means <filename>/usr/local/pgsql/bin</>.
576         </para>
577        </listitem>
578       </varlistentry>
579
580       <varlistentry>
581        <term><option>--datadir=<replaceable>DIRECTORY</></option></term>
582        <listitem>
583         <para>
584          Sets the directory for read-only data files used by the
585          installed programs. The default is
586          <filename><replaceable>PREFIX</>/share</>. Note that this has
587          nothing to do with where your database files will be placed.
588         </para>
589        </listitem>
590       </varlistentry>
591
592       <varlistentry>
593        <term><option>--sysconfdir=<replaceable>DIRECTORY</></option></term>
594        <listitem>
595         <para>
596          The directory for various configuration files,
597          <filename><replaceable>PREFIX</>/etc</> by default.
598         </para>
599        </listitem>
600       </varlistentry>
601
602       <varlistentry>
603        <term><option>--libdir=<replaceable>DIRECTORY</></option></term>
604        <listitem>
605         <para>
606          The location to install libraries and dynamically loadable
607          modules. The default is
608          <filename><replaceable>EXEC-PREFIX</>/lib</>.
609         </para>
610        </listitem>
611       </varlistentry>
612
613       <varlistentry>
614        <term><option>--includedir=<replaceable>DIRECTORY</></option></term>
615        <listitem>
616         <para>
617          The directory for installing C and C++ header files. The
618          default is <filename><replaceable>PREFIX</>/include</>.
619         </para>
620        </listitem>
621       </varlistentry>
622
623       <varlistentry>
624        <term><option>--mandir=<replaceable>DIRECTORY</></option></term>
625        <listitem>
626         <para>
627          The man pages that come with <productname>PostgreSQL</> will be installed under
628          this directory, in their respective
629          <filename>man<replaceable>x</></> subdirectories.
630          The default is <filename><replaceable>PREFIX</>/man</>.
631         </para>
632        </listitem>
633       </varlistentry>
634
635       <varlistentry>
636        <term><option>--with-docdir=<replaceable>DIRECTORY</></option></term>
637        <term><option>--without-docdir</option></term>
638        <listitem>
639         <para>
640          Documentation files, except <quote>man</> pages, will be
641          installed into this directory. The default is
642          <filename><replaceable>PREFIX</>/doc</>.  If the option
643          <option>--without-docdir</option> is specified, the
644          documentation will not be installed by <command>make
645          install</command>.  This is intended for packaging scripts
646          that have special methods for installing documentation.
647         </para>
648        </listitem>
649       </varlistentry>
650      </variablelist>
651
652      <note>
653       <para>
654        Care has been taken to make it possible to install
655        <productname>PostgreSQL</> into shared installation locations
656        (such as <filename>/usr/local/include</filename>) without
657        interfering with the namespace of the rest of the system. First,
658        the string <quote><literal>/postgresql</literal></quote> is
659        automatically appended to <varname>datadir</varname>,
660        <varname>sysconfdir</varname>, and <varname>docdir</varname>,
661        unless the fully expanded directory name already contains the
662        string <quote><literal>postgres</></quote> or
663        <quote><literal>pgsql</></quote>. For example, if you choose
664        <filename>/usr/local</filename> as prefix, the documentation will
665        be installed in <filename>/usr/local/doc/postgresql</filename>,
666        but if the prefix is <filename>/opt/postgres</filename>, then it
667        will be in <filename>/opt/postgres/doc</filename>. The public C
668        header files of the client interfaces are installed into
669        <varname>includedir</varname> and are namespace-clean. The
670        internal header files and the server header files are installed
671        into private directories under <varname>includedir</varname>. See
672        the documentation of each interface for information about how to
673        get at the its header files. Finally, a private subdirectory will
674        also be created, if appropriate, under <varname>libdir</varname>
675        for dynamically loadable modules.
676       </para>
677      </note>
678     </para>
679
680     <para>
681      <variablelist>
682       <varlistentry>
683        <term><option>--with-includes=<replaceable>DIRECTORIES</></option></term>
684        <listitem>
685         <para>
686          <replaceable>DIRECTORIES</> is a colon-separated list of
687          directories that will be added to the list the compiler
688          searches for header files. If you have optional packages
689          (such as GNU <application>Readline</>) installed in a non-standard
690          location,
691          you have to use this option and probably also the corresponding
692          <option>--with-libraries</> option.
693         </para>
694         <para>
695          Example: <literal>--with-includes=/opt/gnu/include:/usr/sup/include</>.
696         </para>
697        </listitem>
698       </varlistentry>
699
700       <varlistentry>
701        <term><option>--with-libraries=<replaceable>DIRECTORIES</></option></term>
702        <listitem>
703         <para>
704          <replaceable>DIRECTORIES</> is a colon-separated list of
705          directories to search for libraries. You will probably have
706          to use this option (and the corresponding
707          <option>--with-includes</> option) if you have packages
708          installed in non-standard locations.
709         </para>
710         <para>
711          Example: <literal>--with-libraries=/opt/gnu/lib:/usr/sup/lib</>.
712         </para>
713        </listitem>
714       </varlistentry>
715
716       <varlistentry>
717        <term><option>--enable-nls<optional>=<replaceable>LANGUAGES</replaceable></optional></option></term>
718        <listitem>
719         <para>
720          Enables Native Language Support (<acronym>NLS</acronym>),
721          that is, the ability to display a program's messages in a
722          language other than English.
723          <replaceable>LANGUAGES</replaceable> is a space-separated
724          list of codes of the languages that you want supported, for
725          example <literal>--enable-nls='de fr'</>.  (The intersection
726          between your list and the set of actually provided
727          translations will be computed automatically.)  If you do not
728          specify a list, then all available translations are
729          installed.
730         </para>
731
732         <para>
733          To use this option, you will need an implementation of the
734          <application>Gettext</> API; see above.
735         </para>
736        </listitem>
737       </varlistentry>
738
739       <varlistentry>
740        <term><option>--with-pgport=<replaceable>NUMBER</></option></term>
741        <listitem>
742         <para>
743          Set <replaceable>NUMBER</> as the default port number for
744          server and clients. The default is 5432. The port can always
745          be changed later on, but if you specify it here then both
746          server and clients will have the same default compiled in,
747          which can be very convenient.  Usually the only good reason
748          to select a non-default value is if you intend to run multiple
749          <productname>PostgreSQL</> servers on the same machine.
750         </para>
751        </listitem>
752       </varlistentry>
753
754       <varlistentry>
755        <term><option>--with-perl</option></term>
756        <listitem>
757         <para>
758          Build the <application>PL/Perl</> server-side language.
759         </para>
760        </listitem>
761       </varlistentry>
762
763       <varlistentry>
764        <term><option>--with-python</option></term>
765        <listitem>
766         <para>
767          Build the <application>PL/Python</> server-side language.
768         </para>
769        </listitem>
770       </varlistentry>
771
772       <varlistentry>
773        <term><option>--with-tcl</option></term>
774        <listitem>
775         <para>
776          Build the <application>PL/Tcl</> server-side language.
777         </para>
778        </listitem>
779       </varlistentry>
780
781       <varlistentry>
782        <term><option>--with-tclconfig=<replaceable>DIRECTORY</replaceable></option></term>
783        <listitem>
784         <para>
785          Tcl installs the file <filename>tclConfig.sh</filename>, which
786          contains configuration information needed to build modules
787          interfacing to Tcl. This file is normally found automatically
788          at a well-known location, but if you want to use a different
789          version of Tcl you can specify the directory in which to look
790          for it.
791         </para>
792        </listitem>
793       </varlistentry>
794
795       <varlistentry>
796        <term><option>--with-krb4</option></term>
797        <term><option>--with-krb5</option></term>
798        <listitem>
799         <para>
800          Build with support for Kerberos authentication. You can use
801          either Kerberos version 4 or 5, but not both.  On many
802          systems, the Kerberos system is not installed in a location
803          that is searched by default (e.g., <filename>/usr/include</>,
804          <filename>/usr/lib</>), so you must use the options
805          <option>--with-includes</> and <option>--with-libraries</> in
806          addition to this option.  <filename>configure</> will check
807          for the required header files and libraries to make sure that
808          your Kerberos installation is sufficient before proceeding.
809         </para>
810        </listitem>
811       </varlistentry>
812
813       <varlistentry>
814        <term><option>--with-krb-srvnam=<replaceable>NAME</></option></term>
815        <listitem>
816         <para>
817          The name of the Kerberos service principal.
818          <literal>postgres</literal> is the default. There's probably no
819          reason to change this.
820         </para>
821        </listitem>
822       </varlistentry>
823
824       <varlistentry>
825        <indexterm>
826         <primary>OpenSSL</primary>
827         <seealso>SSL</seealso>
828        </indexterm>
829
830        <term><option>--with-openssl</option></term>
831        <listitem>
832         <para>
833          Build with support for <acronym>SSL</> (encrypted)
834          connections. This requires the <productname>OpenSSL</>
835          package to be installed.  <filename>configure</> will check
836          for the required header files and libraries to make sure that
837          your <productname>OpenSSL</> installation is sufficient
838          before proceeding.
839         </para>
840        </listitem>
841       </varlistentry>
842
843       <varlistentry>
844        <term><option>--with-pam</option></term>
845        <listitem>
846         <para>
847          Build with <acronym>PAM</><indexterm><primary>PAM</></>
848          (Pluggable Authentication Modules) support.
849         </para>
850        </listitem>
851       </varlistentry>
852
853       <varlistentry>
854        <term><option>--without-readline</option></term>
855        <listitem>
856         <para>
857          Prevents use of the <application>Readline</> library.  This disables
858          command-line editing and history in
859          <application>psql</application>, so it is not recommended.
860         </para>
861        </listitem>
862       </varlistentry>
863
864       <varlistentry>
865        <term><option>--with-rendezvous</option></term>
866        <listitem>
867         <para>
868          Build with Rendezvous support.  This requires Rendezvous support
869          in your operating system.  Recommended on Mac OS X.
870         </para>
871        </listitem>
872       </varlistentry>
873
874       <varlistentry>
875        <term><option>--disable-spinlocks</option></term>
876        <listitem>
877         <para>
878          Allow the build to succeed even if <productname>PostgreSQL</>
879          has no CPU spinlock support for the platform.  The lack of
880          spinlock support will result in poor performance; therefore,
881          this option should only be used if the build aborts and
882          informs you that the platform lacks spinlock support. If this
883          option is required to build <productname>PostgreSQL</> on
884          your platform, please report the problem to the
885          <productname>PostgreSQL</> developers.
886         </para>
887        </listitem>
888       </varlistentry>
889
890       <varlistentry>
891        <term><option>--enable-thread-safety</option></term>
892        <listitem>
893         <para>
894          Make the client libraries thread-safe.  This allows
895          concurrent threads in <application>libpq</application> and
896          <application>ECPG</application> programs to safely control
897          their private connection handles.  This option requires adequate
898          threading support in your operating system.
899         </para>
900        </listitem>
901       </varlistentry>
902
903       <varlistentry>
904        <term><option>--without-zlib</option></term>
905        <listitem>
906         <para>
907          <indexterm>
908           <primary>zlib</primary>
909          </indexterm>
910          Prevents use of the <application>Zlib</> library.  This disables
911          support for compressed archives in <application>pg_dump</application>
912          and <application>pg_restore</application>.
913          This option is only intended for those rare systems where this
914          library is not available.
915         </para>
916        </listitem>
917       </varlistentry>
918
919       <varlistentry>
920        <term><option>--enable-debug</option></term>
921        <listitem>
922         <para>
923          Compiles all programs and libraries with debugging symbols.
924          This means that you can run the programs through a debugger
925          to analyze problems. This enlarges the size of the installed
926          executables considerably, and on non-GCC compilers it usually
927          also disables compiler optimization, causing slowdowns. However,
928          having the symbols available is extremely helpful for dealing
929          with any problems that may arise.  Currently, this option is
930          recommended for production installations only if you use GCC.
931          But you should always have it on if you are doing development work
932          or running a beta version.
933         </para>
934        </listitem>
935       </varlistentry>
936
937       <varlistentry>
938        <term><option>--enable-cassert</option></term>
939        <listitem>
940         <para>
941          Enables <firstterm>assertion</> checks in the server, which test for
942          many <quote>can't happen</> conditions.  This is invaluable for
943          code development purposes, but the tests slow things down a little.
944          Also, having the tests turned on won't necessarily enhance the
945          stability of your server!  The assertion checks are not categorized
946          for severity, and so what might be a relatively harmless bug will
947          still lead to server restarts if it triggers an assertion
948          failure.  Currently, this option is not recommended for
949          production use, but you should have it on for development work
950          or when running a beta version.
951         </para>
952        </listitem>
953       </varlistentry>
954
955       <varlistentry>
956        <term><option>--enable-depend</option></term>
957        <listitem>
958         <para>
959          Enables automatic dependency tracking.  With this option, the
960          makefiles are set up so that all affected object files will
961          be rebuilt when any header file is changed.  This is useful
962          if you are doing development work, but is just wasted overhead
963          if you intend only to compile once and install.  At present,
964          this option will work only if you use GCC.
965         </para>
966        </listitem>
967       </varlistentry>
968
969      </variablelist>
970     </para>
971
972     <para>
973      If you prefer a C compiler different from the one
974      <filename>configure</filename> picks, you can set the
975      environment variable <envar>CC</> to the program of your choice.
976      By default, <filename>configure</filename> will pick
977      <filename>gcc</filename> if available, else the platform's
978      default (usually <filename>cc</>).  Similarly, you can override the
979      default compiler flags if needed with the <envar>CFLAGS</envar> variable.
980     </para>
981
982     <para>
983      You can specify environment variables on the
984      <filename>configure</filename> command line, for example:
985 <screen>
986 <userinput>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</>
987 </screen>
988     </para>
989    </step>
990
991   <step>
992    <title>Build</title>
993
994    <para>
995     To start the build, type
996 <screen>
997 <userinput>gmake</userinput>
998 </screen>
999     (Remember to use <acronym>GNU</> <application>make</>.) The build
1000     may take anywhere from 5 minutes to half an hour depending on your
1001     hardware. The last line displayed should be
1002 <screen>
1003 All of PostgreSQL is successfully made. Ready to install.
1004 </screen>
1005    </para>
1006   </step>
1007
1008   <step>
1009    <title>Regression Tests</title>
1010
1011    <indexterm>
1012     <primary>regression test</primary>
1013    </indexterm>
1014
1015    <para>
1016     If you want to test the newly built server before you install it,
1017     you can run the regression tests at this point. The regression
1018     tests are a test suite to verify that <productname>PostgreSQL</>
1019     runs on your machine in the way the developers expected it
1020     to. Type
1021 <screen>
1022 <userinput>gmake check</userinput>
1023 </screen>
1024     (This won't work as root; do it as an unprivileged user.)
1025     <![%standalone-include[The file
1026     <filename>src/test/regress/README</> and the
1027     documentation contain]]>
1028     <![%standalone-ignore[<xref linkend="regress"> contains]]>
1029     detailed information about interpreting the test results. You can
1030     repeat this test at any later time by issuing the same command.
1031    </para>
1032   </step>
1033
1034   <step id="install">
1035    <title>Installing The Files</title>
1036
1037    <note>
1038     <para>
1039      If you are upgrading an existing system and are going to install
1040      the new files over the old ones, be sure to back up
1041      your data and shut down the old server before proceeding, as explained in
1042      <xref linkend="install-upgrading"> above.
1043     </para>
1044    </note>
1045
1046    <para>
1047     To install <productname>PostgreSQL</> enter
1048 <screen>
1049 <userinput>gmake install</userinput>
1050 </screen>
1051     This will install files into the directories that were specified
1052     in <xref linkend="configure">. Make sure that you have appropriate
1053     permissions to write into that area. Normally you need to do this
1054     step as root. Alternatively, you could create the target
1055     directories in advance and arrange for appropriate permissions to
1056     be granted.
1057    </para>
1058
1059    <para>
1060     You can use <literal>gmake install-strip</literal> instead of
1061     <literal>gmake install</literal> to strip the executable files and
1062     libraries as they are installed.  This will save some space.  If
1063     you built with debugging support, stripping will effectively
1064     remove the debugging support, so it should only be done if
1065     debugging is no longer needed.  <literal>install-strip</literal>
1066     tries to do a reasonable job saving space, but it does not have
1067     perfect knowledge of how to strip every unneeded byte from an
1068     executable file, so if you want to save all the disk space you
1069     possibly can, you will have to do manual work.
1070    </para>
1071
1072    <para>
1073     The standard installation provides all the header files needed for client
1074     application development as well as for server-side program
1075     development, such as custom functions or data types written in C.
1076     (Prior to <productname>PostgreSQL</> 8.0, a separate <literal>gmake
1077     install-all-headers</> command was needed for the latter, but this
1078     step has been folded into the standard install.)
1079    </para>
1080
1081    <formalpara>
1082     <title>Client-only installation:</title>
1083     <para>
1084      If you want to install only the client applications and
1085      interface libraries, then you can use these commands:
1086 <screen>
1087 <userinput>gmake -C src/bin install</>
1088 <userinput>gmake -C src/include install</>
1089 <userinput>gmake -C src/interfaces install</>
1090 <userinput>gmake -C doc install</>
1091 </screen>
1092     </para>
1093    </formalpara>
1094   </step>
1095   </procedure>
1096
1097   <formalpara>
1098    <title>Registering <application>eventlog</> on <systemitem 
1099    class="osname">Windows</>:</title>
1100    <para>
1101     To register a <systemitem class="osname">Windows</> <application>eventlog</>
1102     library with the operating system, issue this command after installation:
1103 <screen>
1104 <userinput>regsvr32 <replaceable>pgsql_library_directory</>/pgevent.dll</>
1105 </screen>
1106     This creates registry entries used by the event viewer.
1107    </para>
1108   </formalpara>
1109
1110   <formalpara>
1111    <title>Uninstallation:</title>
1112    <para>
1113     To undo the installation use the command <command>gmake
1114     uninstall</>. However, this will not remove any created directories.
1115    </para>
1116   </formalpara>
1117
1118   <formalpara>
1119    <title>Cleaning:</title>
1120
1121    <para>
1122     After the installation you can make room by removing the built
1123     files from the source tree with the command <command>gmake
1124     clean</>. This will preserve the files made by the <command>configure</command>
1125     program, so that you can rebuild everything with <command>gmake</>
1126     later on. To reset the source tree to the state in which it was
1127     distributed, use <command>gmake distclean</>. If you are going to
1128     build for several platforms within the same source tree you must do
1129     this and re-configure for each build.  (Alternatively, use
1130     a separate build tree for each platform, so that the source tree
1131     remains unmodified.)
1132    </para>
1133   </formalpara>
1134
1135   <para>
1136    If you perform a build and then discover that your <command>configure</>
1137    options were wrong, or if you change anything that <command>configure</>
1138    investigates (for example, software upgrades), then it's a good
1139    idea to do <command>gmake distclean</> before reconfiguring and
1140    rebuilding.  Without this, your changes in configuration choices
1141    may not propagate everywhere they need to.
1142   </para>
1143  </sect1>
1144
1145  <sect1 id="install-post">
1146   <title>Post-Installation Setup</title>
1147
1148   <sect2>
1149    <title>Shared Libraries</title>
1150
1151    <indexterm>
1152     <primary>shared library</primary>
1153    </indexterm>
1154
1155    <para>
1156     On some systems that have shared libraries (which most systems do)
1157     you need to tell your system how to find the newly installed
1158     shared libraries.  The systems on which this is
1159     <emphasis>not</emphasis> necessary include <systemitem
1160     class="osname">BSD/OS</>, <systemitem class="osname">FreeBSD</>,
1161     <systemitem class="osname">HP-UX</>, <systemitem
1162     class="osname">IRIX</>, <systemitem class="osname">Linux</>,
1163     <systemitem class="osname">NetBSD</>, <systemitem
1164     class="osname">OpenBSD</>, <systemitem class="osname">Tru64
1165     UNIX</> (formerly <systemitem class="osname">Digital UNIX</>), and
1166     <systemitem class="osname">Solaris</>.
1167    </para>
1168
1169    <para>
1170     The method to set the shared library search path varies between
1171     platforms, but the most widely usable method is to set the
1172     environment variable <envar>LD_LIBRARY_PATH</> like so: In Bourne
1173     shells (<command>sh</>, <command>ksh</>, <command>bash</>, <command>zsh</>)
1174 <programlisting>
1175 LD_LIBRARY_PATH=/usr/local/pgsql/lib
1176 export LD_LIBRARY_PATH
1177 </programlisting>
1178     or in <command>csh</> or <command>tcsh</>
1179 <programlisting>
1180 setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
1181 </programlisting>
1182     Replace <literal>/usr/local/pgsql/lib</> with whatever you set
1183     <option><literal>--libdir</></> to in <xref linkend="configure">.
1184     You should put these commands into a shell start-up file such as
1185     <filename>/etc/profile</> or <filename>~/.bash_profile</>.  Some
1186     good information about the caveats associated with this method can
1187     be found at <ulink
1188     url="http://www.visi.com/~barr/ldpath.html"></ulink>.
1189    </para>
1190
1191    <para>
1192     On some systems it might be preferable to set the environment
1193     variable <envar>LD_RUN_PATH</envar> <emphasis>before</emphasis>
1194     building.
1195    </para>
1196
1197    <para>
1198     On <systemitem class="osname">Cygwin</systemitem>, put the library
1199     directory in the <envar>PATH</envar> or move the
1200     <filename>.dll</filename> files into the <filename>bin</filename>
1201     directory.
1202    </para>
1203
1204    <para>
1205     If in doubt, refer to the manual pages of your system (perhaps
1206     <command>ld.so</command> or <command>rld</command>). If you later
1207     on get a message like
1208 <screen>
1209 psql: error in loading shared libraries
1210 libpq.so.2.1: cannot open shared object file: No such file or directory
1211 </screen>
1212     then this step was necessary.  Simply take care of it then.
1213    </para>
1214
1215    <para>
1216     <indexterm>
1217      <primary>ldconfig</primary>
1218     </indexterm>
1219     If you are on <systemitem class="osname">BSD/OS</>, <systemitem
1220     class="osname">Linux</>, or <systemitem class="osname">SunOS 4</>
1221     and you have root access you can run
1222 <programlisting>
1223 /sbin/ldconfig /usr/local/pgsql/lib
1224 </programlisting>
1225     (or equivalent directory) after installation to enable the
1226     run-time linker to find the shared libraries faster.  Refer to the
1227     manual page of <command>ldconfig</> for more information.  On
1228     <systemitem class="osname">FreeBSD</>, <systemitem
1229     class="osname">NetBSD</>, and <systemitem
1230     class="osname">OpenBSD</> the command is
1231 <programlisting>
1232 /sbin/ldconfig -m /usr/local/pgsql/lib
1233 </programlisting>
1234     instead.  Other systems are not known to have an equivalent
1235     command.
1236    </para>
1237   </sect2>
1238
1239   <sect2>
1240    <title>Environment Variables</title>
1241
1242    <indexterm>
1243     <primary><envar>PATH</envar></primary>
1244    </indexterm>
1245
1246    <para>
1247     If you installed into <filename>/usr/local/pgsql</> or some other
1248     location that is not searched for programs by default, you should
1249     add <filename>/usr/local/pgsql/bin</> (or whatever you set
1250     <option><literal>--bindir</></> to in <xref linkend="configure">)
1251     into your <envar>PATH</>.  Strictly speaking, this is not
1252     necessary, but it will make the use of <productname>PostgreSQL</>
1253     much more convenient.
1254    </para>
1255
1256    <para>
1257     To do this, add the following to your shell start-up file, such as
1258     <filename>~/.bash_profile</> (or <filename>/etc/profile</>, if you
1259     want it to affect every user):
1260 <programlisting>
1261 PATH=/usr/local/pgsql/bin:$PATH
1262 export PATH
1263 </programlisting>
1264     If you are using <command>csh</> or <command>tcsh</>, then use this command:
1265 <programlisting>
1266 set path = ( /usr/local/pgsql/bin $path )
1267 </programlisting>
1268    </para>
1269
1270    <para>
1271     <indexterm>
1272      <primary><envar>MANPATH</envar></primary>
1273     </indexterm>
1274     To enable your system to find the <application>man</>
1275     documentation, you need to add lines like the following to a
1276     shell start-up file unless you installed into a location that is
1277     searched by default.
1278 <programlisting>
1279 MANPATH=/usr/local/pgsql/man:$MANPATH
1280 export MANPATH
1281 </programlisting>
1282    </para>
1283
1284    <para>
1285     The environment variables <envar>PGHOST</> and <envar>PGPORT</>
1286     specify to client applications the host and port of the database
1287     server, overriding the compiled-in defaults. If you are going to
1288     run client applications remotely then it is convenient if every
1289     user that plans to use the database sets <envar>PGHOST</>.  This
1290     is not required, however: the settings can be communicated via command
1291     line options to most client programs.
1292    </para>
1293   </sect2>
1294  </sect1>
1295
1296
1297 <![%standalone-include;[
1298  <sect1 id="install-getting-started">
1299   <title>Getting Started</title>
1300
1301   <para>
1302    The following is a quick summary of how to get <productname>PostgreSQL</> up and
1303    running once installed. The main documentation contains more information.
1304   </para>
1305
1306   <procedure>
1307    <step>
1308     <para>
1309      Create a user account for the <productname>PostgreSQL</>
1310      server. This is the user the server will run as. For production
1311      use you should create a separate, unprivileged account
1312      (<quote>postgres</> is commonly used). If you do not have root
1313      access or just want to play around, your own user account is
1314      enough, but running the server as root is a security risk and
1315      will not work.
1316 <screen>
1317 <userinput>adduser postgres</>
1318 </screen>
1319     </para>
1320    </step>
1321
1322    <step>
1323     <para>
1324      Create a database installation with the <command>initdb</>
1325      command. To run <command>initdb</> you must be logged in to your
1326      <productname>PostgreSQL</> server account. It will not work as
1327      root.
1328 <screen>
1329 root# <userinput>mkdir /usr/local/pgsql/data</>
1330 root# <userinput>chown postgres /usr/local/pgsql/data</>
1331 root# <userinput>su - postgres</>
1332 postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
1333 </screen>
1334     </para>
1335
1336     <para>
1337      The <option>-D</> option specifies the location where the data
1338      will be stored. You can use any path you want, it does not have
1339      to be under the installation directory. Just make sure that the
1340      server account can write to the directory (or create it, if it
1341      doesn't already exist) before starting <command>initdb</>, as
1342      illustrated here.
1343     </para>
1344    </step>
1345
1346    <step>
1347     <para>
1348      The previous step should have told you how to start up the
1349      database server. Do so now. The command should look something
1350      like
1351 <programlisting>
1352 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
1353 </programlisting>
1354      This will start the server in the foreground. To put the server
1355      in the background use something like
1356 <programlisting>
1357 nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data \
1358     &lt;/dev/null &gt;&gt;server.log 2&gt;&amp;1 &lt;/dev/null &amp;
1359 </programlisting>
1360     </para>
1361
1362     <para>
1363      To stop a server running in the background you can type
1364 <programlisting>
1365 kill `cat /usr/local/pgsql/data/postmaster.pid`
1366 </programlisting>
1367     </para>
1368
1369     <para>
1370      In order to allow TCP/IP connections (rather than only Unix
1371      domain socket ones) you need to pass the <option>-i</> option to
1372      <filename>postmaster</>.
1373     </para>
1374    </step>
1375
1376    <step>
1377     <para>
1378      Create a database:
1379 <screen>
1380 <userinput>createdb testdb</>
1381 </screen>
1382      Then enter
1383 <screen>
1384 <userinput>psql testdb</>
1385 </screen>
1386      to connect to that database. At the prompt you can enter SQL
1387      commands and start experimenting.
1388     </para>
1389    </step>
1390   </procedure>
1391  </sect1>
1392
1393  <sect1 id="install-whatnow">
1394   <title>What Now?</title>
1395
1396   <para>
1397    <itemizedlist>
1398     <listitem>
1399      <para>
1400       The <productname>PostgreSQL</> distribution contains a
1401       comprehensive documentation set, which you should read sometime.
1402       After installation, the documentation can be accessed by
1403       pointing your browser to
1404       <filename>/usr/local/pgsql/doc/html/index.html</>, unless you
1405       changed the installation directories.
1406      </para>
1407
1408      <para>
1409       The first few chapters of the main documentation are the Tutorial,
1410       which should be your first reading if you are completely new to
1411       <acronym>SQL</> databases.  If you are familiar with database
1412       concepts then you want to proceed with part on server
1413       administration, which contains information about how to set up
1414       the database server, database users, and authentication.
1415      </para>
1416     </listitem>
1417
1418     <listitem>
1419      <para>
1420       Usually, you will want to modify your computer so that it will
1421       automatically start the database server whenever it boots. Some
1422       suggestions for this are in the documentation.
1423      </para>
1424     </listitem>
1425
1426     <listitem>
1427      <para>
1428       Run the regression tests against the installed server (using
1429       <command>gmake installcheck</command>). If you didn't run the
1430       tests before installation, you should definitely do it now. This
1431       is also explained in the documentation.
1432      </para>
1433     </listitem>
1434
1435     <listitem>
1436      <para>
1437       By default, <productname>PostgreSQL</> is configured to run on
1438       minimal hardware.  This allows it to start up with almost any
1439       hardware configuration. The default configuration is, however,
1440       not designed for optimum performance. To achieve optimum
1441       performance, several server parameters must be adjusted, the two
1442       most common being <varname>shared_buffers</varname> and
1443       <varname>work_mem</varname>.
1444       Other parameters mentioned in the documentation also affect
1445       performance.
1446      </para>
1447     </listitem>
1448    </itemizedlist>
1449   </para>
1450  </sect1>
1451 ]]>
1452
1453
1454  <sect1 id="supported-platforms">
1455   <title>Supported Platforms</title>
1456
1457   <para>
1458    <productname>PostgreSQL</> has been verified by the developer
1459    community to work on the platforms listed below. A supported
1460    platform generally means that <productname>PostgreSQL</> builds and
1461    installs according to these instructions and that the regression
1462    tests pass.  <quote>Build farm</quote> entries refer to builds
1463    reported by the <ulink url="http://www.pgbuildfarm.org/">PostgreSQL
1464    Build Farm</ulink>.  Platform entries that show an older version of
1465    PostgreSQL are those that did not receive explicit testing at the
1466    time of release of version &majorversion; but that we still
1467    expect to work.
1468   </para>
1469
1470   <note>
1471    <para>
1472     If you are having problems with the installation on a supported
1473     platform, please write to <email>pgsql-bugs@postgresql.org</email>
1474     or <email>pgsql-ports@postgresql.org</email>, not to the people
1475     listed here.
1476    </para>
1477   </note>
1478
1479     <informaltable>
1480      <tgroup cols="5">
1481       <thead>
1482        <row>
1483         <entry><acronym>OS</acronym></entry>
1484         <entry>Processor</entry>
1485         <entry>Version</entry>
1486         <entry>Reported</entry>
1487         <entry>Remarks</entry>
1488        </row>
1489       </thead>
1490       <tbody>
1491        <row>
1492         <entry><systemitem class="osname">AIX</></entry>
1493         <entry><systemitem>PowerPC</></entry>
1494         <entry>8.0.0</entry>
1495         <entry>Travis P (<email>twp@castle.fastmail.fm</email>), 2004-12-12</entry>
1496         <entry>see also <filename>doc/FAQ_AIX</filename></entry>
1497        </row>
1498        <row>
1499         <entry><systemitem class="osname">AIX</></entry>
1500         <entry><systemitem>RS6000</></entry>
1501         <entry>8.0.0</entry>
1502         <entry>Hans-J&uuml;rgen Sch&ouml;nig (<email>hs@cybertec.at</email>), 2004-12-06</entry>
1503         <entry>see also <filename>doc/FAQ_AIX</filename></entry>
1504        </row>
1505        <row>
1506         <entry><systemitem class="osname">BSD/OS</></entry>
1507         <entry><systemitem>x86</></entry>
1508         <entry>8.0.0</entry>
1509         <entry>Bruce Momjian (<email>pgman@candle.pha.pa.us</email>), 2004-12-07</entry>
1510         <entry>4.3.1</entry>
1511        </row>
1512        <row>
1513         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1514         <entry><systemitem>Alpha</></entry>
1515         <entry>7.4</entry>
1516         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2003-10-25</entry>
1517         <entry></entry>
1518        </row>
1519        <row>
1520         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1521         <entry><systemitem>AMD64</></entry>
1522         <entry>8.0.0</entry>
1523         <entry>Build farm <systemitem class="systemname">panda</systemitem>, snapshot 2004-12-06 01:20:02</entry>
1524         <entry>sid, kernel 2.6</entry>
1525        </row>
1526        <row>
1527         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1528         <entry><systemitem>ARM</></entry>
1529         <entry>8.0.0</entry>
1530         <entry>Jim Buttafuoco (<email>jim@contactbda.com</email>), 2005-01-06</entry>
1531         <entry></entry>
1532        </row>
1533        <row>
1534         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1535         <entry><systemitem>Itanium</></entry>
1536         <entry>7.4</entry>
1537         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2003-10-25</entry>
1538         <entry></entry>
1539        </row>
1540        <row>
1541         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1542         <entry><systemitem>m68k</></entry>
1543         <entry>8.0.0</entry>
1544         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2004-12-09</entry>
1545         <entry>sid</entry>
1546        </row>
1547        <row>
1548         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1549         <entry><systemitem>MIPS</></entry>
1550         <entry>8.0.0</entry>
1551         <entry>Build farm <systemitem class="systemname">lionfish</systemitem>, snapshot 2004-12-06 11:00:08</entry>
1552         <entry>3.1 (sarge), kernel 2.4</entry>
1553        </row>
1554        <row>
1555         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1556         <entry><systemitem>PA-RISC</></entry>
1557         <entry>8.0.0</entry>
1558         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2004-12-07</entry>
1559         <entry>sid</entry>
1560      </row>
1561        <row>
1562         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1563         <entry><systemitem>PowerPC</></entry>
1564         <entry>8.0.0</entry>
1565         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2004-12-15</entry>
1566         <entry>sid</entry>
1567        </row>
1568        <row>
1569         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1570         <entry><systemitem>S/390</></entry>
1571         <entry>7.4</entry>
1572         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2003-10-25</entry>
1573         <entry></entry>
1574        </row>
1575        <row>
1576         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1577         <entry><systemitem>Sparc</></entry>
1578         <entry>8.0.0</entry>
1579         <entry>No&egrave;l K&ouml;the (<email>noel@debian.org</email>), 2004-12-09</entry>
1580         <entry>sid, 32-bit</entry>
1581        </row>
1582        <row>
1583         <entry><systemitem class="osname">Debian GNU/Linux</></entry>
1584         <entry><systemitem>x86</></entry>
1585         <entry>8.0.0</entry>
1586         <entry>Peter Eisentraut (<email>peter_e@gmx.net</email>), 2004-12-06</entry>
1587         <entry>3.1 (sarge), kernel 2.6</entry>
1588        </row>
1589        <row>
1590         <entry><systemitem class="osname">Fedora</></entry>
1591         <entry><systemitem>AMD64</></entry>
1592         <entry>8.0.0</entry>
1593         <entry>John Gray (<email>jgray@azuli.co.uk</email>), 2004-12-12</entry>
1594         <entry>FC3</entry>
1595        </row>
1596        <row>
1597         <entry><systemitem class="osname">Fedora</></entry>
1598         <entry><systemitem>x86</></entry>
1599         <entry>8.0.0</entry>
1600         <entry>Build farm <systemitem class="systemname">dog</systemitem>, snapshot 2004-12-06 02:06:01</entry>
1601         <entry>FC1</entry>
1602        </row>
1603        <row>
1604         <entry><systemitem class="osname">FreeBSD</></entry>
1605         <entry><systemitem>Alpha</></entry>
1606         <entry>7.4</entry>
1607         <entry>Peter Eisentraut (<email>peter_e@gmx.net</email>), 2003-10-25</entry>
1608         <entry>4.8</entry>
1609        </row>
1610        <row>
1611         <entry><systemitem class="osname">FreeBSD</></entry>
1612         <entry><systemitem>x86</></entry>
1613         <entry>8.0.0</entry>
1614         <entry>Build farm <systemitem class="systemname">cockatoo</systemitem>, snapshot 2004-12-06 14:10:01 (4.10);
1615          Marc Fournier (<email>scrappy@postgresql.org</email>), 2004-12-07 (5.3)</entry>
1616         <entry></entry>
1617        </row>
1618        <row>
1619         <entry><systemitem class="osname">Gentoo Linux</></entry>
1620         <entry><systemitem>x86</></entry>
1621         <entry>8.0.0</entry>
1622         <entry>Paul Bort (<email>pbort@tmwsystems.com</email>), 2004-12-07</entry>
1623         <entry></entry>
1624        </row>
1625        <row>
1626         <entry><systemitem class="osname">HP-UX</></entry>
1627         <entry><systemitem>Itanium</></entry>
1628         <entry>8.0.0</entry>
1629         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2005-01-06</entry>
1630         <entry>11.23, <command>gcc</> and <command>cc</>; see also <filename>doc/FAQ_HPUX</filename></entry>
1631        </row>
1632        <row>
1633         <entry><systemitem class="osname">HP-UX</></entry>
1634         <entry><systemitem>PA-RISC</></entry>
1635         <entry>8.0.0</entry>
1636         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2005-01-06</entry>
1637         <entry>10.20 and 11.11, <command>gcc</> and <command>cc</>; see also <filename>doc/FAQ_HPUX</filename></entry>
1638        </row>
1639        <row>
1640         <entry><systemitem class="osname">IRIX</></entry>
1641         <entry><systemitem>MIPS</></entry>
1642         <entry>7.4</entry>
1643         <entry>Robert E. Bruccoleri (<email>bruc@stone.congenomics.com</email>), 2003-11-12</entry>
1644         <entry>6.5.20, <command>cc</command> only</entry>
1645        </row>
1646        <row>
1647         <entry><systemitem class="osname">Mac OS X</></entry>
1648         <entry><systemitem>PowerPC</></entry>
1649         <entry>8.0.0</entry>
1650         <entry>Andrew Rawnsley (<email>ronz@ravensfield.com</email>), 2004-12-07</entry>
1651         <entry>10.3.5</entry>
1652        </row>
1653        <row>
1654         <entry><systemitem class="osname">Mandrakelinux</></entry>
1655         <entry><systemitem>x86</></entry>
1656         <entry>8.0.0</entry>
1657         <entry>Build farm <systemitem class="systemname">shrew</systemitem>, snapshot 2004-12-06 02:02:01</entry>
1658         <entry>10.0</entry>
1659        </row>
1660        <row>
1661         <entry><systemitem class="osname">NetBSD</></entry>
1662         <entry><systemitem>arm32</></entry>
1663         <entry>7.4</entry>
1664         <entry>Patrick Welche (<email>prlw1@newn.cam.ac.uk</email>), 2003-11-12</entry>
1665         <entry>1.6ZE/acorn32</entry>
1666        </row>
1667        <row>
1668         <entry><systemitem class="osname">NetBSD</></entry>
1669         <entry><systemitem>m68k</></entry>
1670         <entry>8.0.0</entry>
1671         <entry>R&eacute;mi Zara (<email>remi_zara@mac.com</email>), 2004-12-14</entry>
1672         <entry>2.0</entry>
1673        </row>
1674        <row>
1675         <entry><systemitem class="osname">NetBSD</></entry>
1676         <entry><systemitem>Sparc</></entry>
1677         <entry>7.4.1</entry>
1678         <entry>Peter Eisentraut (<email>peter_e@gmx.net</email>), 2003-11-26</entry>
1679         <entry>1.6.1, 32-bit</entry>
1680        </row>
1681        <row>
1682         <entry><systemitem class="osname">NetBSD</></entry>
1683         <entry><systemitem>x86</></entry>
1684         <entry>8.0.0</entry>
1685         <entry>Build farm <systemitem class="systemname">canary</systemitem>, snapshot 2004-12-06 03:30:00</entry>
1686         <entry>1.6</entry>
1687        </row>
1688        <row>
1689         <entry><systemitem class="osname">OpenBSD</></entry>
1690         <entry><systemitem>Sparc</></entry>
1691         <entry>8.0.0</entry>
1692         <entry>Chris Mair (<email>list@1006.org</email>), 2005-01-10</entry>
1693         <entry>3.3</entry>
1694        </row>
1695        <row>
1696         <entry><systemitem class="osname">OpenBSD</></entry>
1697         <entry><systemitem>Sparc64</></entry>
1698         <entry>8.0.0</entry>
1699         <entry>Build farm <systemitem class="systemname">spoonbill</systemitem>, snapshot 2005-01-06 00:50:05</entry>
1700         <entry>3.6</entry>
1701        </row>
1702        <row>
1703         <entry><systemitem class="osname">OpenBSD</></entry>
1704         <entry><systemitem>x86</></entry>
1705         <entry>8.0.0</entry>
1706         <entry>Build farm <systemitem class="systemname">emu</systemitem>, snapshot 2004-12-06 11:35:03</entry>
1707         <entry>3.6</entry>
1708        </row>
1709        <row>
1710         <entry><systemitem class="osname">Red Hat Linux</></entry>
1711         <entry><systemitem>AMD64</></entry>
1712         <entry>8.0.0</entry>
1713         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1714         <entry>RHEL 3AS</entry>
1715        </row>
1716        <row>
1717         <entry><systemitem class="osname">Red Hat Linux</></entry>
1718         <entry><systemitem>IA64</></entry>
1719         <entry>8.0.0</entry>
1720         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1721         <entry>RHEL 3AS</entry>
1722        </row>
1723        <row>
1724         <entry><systemitem class="osname">Red Hat Linux</></entry>
1725         <entry><systemitem>PowerPC</></entry>
1726         <entry>8.0.0</entry>
1727         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1728         <entry>RHEL 3AS</entry>
1729        </row>
1730        <row>
1731         <entry><systemitem class="osname">Red Hat Linux</></entry>
1732         <entry><systemitem>PowerPC 64</></entry>
1733         <entry>8.0.0</entry>
1734         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1735         <entry>RHEL 3AS</entry>
1736        </row>
1737        <row>
1738         <entry><systemitem class="osname">Red Hat Linux</></entry>
1739         <entry><systemitem>S/390</></entry>
1740         <entry>8.0.0</entry>
1741         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1742         <entry>RHEL 3AS</entry>
1743        </row>
1744        <row>
1745         <entry><systemitem class="osname">Red Hat Linux</></entry>
1746         <entry><systemitem>S/390x</></entry>
1747         <entry>8.0.0</entry>
1748         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1749         <entry>RHEL 3AS</entry>
1750        </row>
1751        <row>
1752         <entry><systemitem class="osname">Red Hat Linux</></entry>
1753         <entry><systemitem>x86</></entry>
1754         <entry>8.0.0</entry>
1755         <entry>Tom Lane (<email>tgl@sss.pgh.pa.us</email>), 2004-12-07</entry>
1756         <entry>RHEL 3AS</entry>
1757        </row>
1758        <row>
1759         <entry><systemitem class="osname">Solaris</></entry>
1760         <entry><systemitem>Sparc</></entry>
1761         <entry>8.0.0</entry>
1762         <entry>Kenneth Marshall (<email>ktm@is.rice.edu</email>), 2004-12-07</entry>
1763         <entry>Solaris 8; see also <filename>doc/FAQ_Solaris</filename></entry>
1764        </row>
1765        <row>
1766         <entry><systemitem class="osname">Solaris</></entry>
1767         <entry><systemitem>x86</></entry>
1768         <entry>8.0.0</entry>
1769         <entry>Build farm <systemitem class="systemname">kudu</systemitem>, snapshot 2004-12-10 02:30:04 (<command>cc</command>);
1770           <systemitem class="systemname">dragonfly</systemitem>, snapshot 2004-12-09 04:30:00 (<command>gcc</command>)</entry>
1771         <entry>Solaris 9; see also <filename>doc/FAQ_Solaris</filename></entry>
1772        </row>
1773        <row>
1774         <entry><systemitem class="osname">SUSE Linux</></entry>
1775         <entry><systemitem>x86</></entry>
1776         <entry>8.0.0</entry>
1777         <entry>Peter Eisentraut (<email>peter_e@gmx.net</email>), 2005-01-10</entry>
1778         <entry>9.1</entry>
1779        </row>
1780        <row>
1781         <entry><systemitem class="osname">Tru64 UNIX</></entry>
1782         <entry><systemitem>Alpha</></entry>
1783         <entry>8.0.0</entry>
1784         <entry>Honda Shigehiro (<email>fwif0083@mb.infoweb.ne.jp</email>), 2005-01-07</entry>
1785         <entry>5.0</entry>
1786        </row>
1787        <row>
1788         <entry><systemitem class="osname">UnixWare</></entry>
1789         <entry><systemitem>x86</></entry>
1790         <entry>8.0.0</entry>
1791         <entry>Peter Eisentraut (<email>peter_e@gmx.net</email>), 2004-12-14</entry>
1792         <entry><command>cc</command>, 7.1.4; see also <filename>doc/FAQ_SCO</filename></entry>
1793        </row>
1794        <row>
1795         <entry><systemitem class="osname">Windows</></entry>
1796         <entry><systemitem>x86</></entry>
1797         <entry>8.0.0</entry>
1798         <entry>Dave Page (<email>dpage@vale-housing.co.uk</email>), 2004-12-07</entry>
1799         <entry>XP Pro; see <filename>doc/FAQ_MINGW</filename></entry>
1800        </row>
1801        <row>
1802         <entry><systemitem class="osname">Windows with <application>Cygwin</application></></entry>
1803         <entry><systemitem>x86</></entry>
1804         <entry>8.0.0</entry>
1805         <entry>Build farm <systemitem class="systemname">gibbon</systemitem>, snapshot 2004-12-11 01:33:01</entry>
1806         <entry>see <filename>doc/FAQ_CYGWIN</filename></entry>
1807        </row>
1808       </tbody>
1809      </tgroup>
1810     </informaltable>
1811
1812   <formalpara>
1813    <title>Unsupported Platforms:</title>
1814    <para>
1815     The following platforms are either known not to work, or they used
1816     to work in a fairly distant previous release.  We include these
1817     here to let you know that these platforms <emphasis>could</> be
1818     supported if given some attention.
1819    </para>
1820   </formalpara>
1821
1822   <informaltable>
1823    <tgroup cols="5">
1824     <thead>
1825      <row>
1826       <entry><acronym>OS</acronym></entry>
1827       <entry>Processor</entry>
1828       <entry>Version</entry>
1829       <entry>Reported</entry>
1830       <entry>Remarks</entry>
1831      </row>
1832     </thead>
1833
1834     <tbody>
1835      <row>
1836       <entry><systemitem class="osname">BeOS</></entry>
1837       <entry><systemitem>x86</></entry>
1838       <entry>7.2</entry>
1839       <entry>Cyril Velter (<email>cyril.velter@libertysurf.fr</email>), 2001-11-29</entry>
1840       <entry>needs updates to semaphore code</entry>
1841      </row>
1842      <row>
1843       <entry><systemitem class="osname">Linux</></entry>
1844       <entry><systemitem>PlayStation 2</></entry>
1845       <entry>8.0.0</entry>
1846       <entry>Chris Mair (<email>list@1006.org</email>), 2005-01-09</entry>
1847       <entry>requires <option>--disable-spinlocks</option> (works, but slow)</entry>
1848      </row>
1849      <row>
1850       <entry><systemitem class="osname">NetBSD</></entry>
1851       <entry><systemitem>Alpha</></entry>
1852       <entry>7.2</entry>
1853       <entry>Thomas Thai (<email>tom@minnesota.com</email>), 2001-11-20</entry>
1854       <entry>1.5W</entry>
1855      </row>
1856      <row>
1857       <entry><systemitem class="osname">NetBSD</></entry>
1858       <entry><systemitem>MIPS</></entry>
1859       <entry>7.2.1</entry>
1860       <entry>Warwick Hunter (<email>whunter@agile.tv</email>), 2002-06-13</entry>
1861       <entry>1.5.3</entry>
1862      </row>
1863      <row>
1864       <entry><systemitem class="osname">NetBSD</></entry>
1865       <entry><systemitem>PowerPC</></entry>
1866       <entry>7.2</entry>
1867       <entry>Bill Studenmund (<email>wrstuden@netbsd.org</email>), 2001-11-28</entry>
1868       <entry>1.5</entry>
1869      </row>
1870      <row>
1871       <entry><systemitem class="osname">NetBSD</></entry>
1872       <entry><systemitem>VAX</></entry>
1873       <entry>7.1</entry>
1874       <entry>Tom I. Helbekkmo (<email>tih@kpnQwest.no</email>), 2001-03-30</entry>
1875       <entry>1.5</entry>
1876      </row>
1877      <row>
1878       <entry><systemitem class="osname">QNX 4 RTOS</></entry>
1879       <entry><systemitem>x86</></entry>
1880       <entry>7.2</entry>
1881       <entry>Bernd Tegge (<email>tegge@repas-aeg.de</email>), 2001-12-10
1882       </entry>
1883       <entry>needs updates to semaphore code;
1884        see also <filename>doc/FAQ_QNX4</filename></entry>
1885      </row>
1886      <row>
1887       <entry><systemitem class="osname">QNX RTOS v6</></entry>
1888       <entry><systemitem>x86</></entry>
1889       <entry>7.2</entry>
1890       <entry>Igor Kovalenko (<email>Igor.Kovalenko@motorola.com</email>), 2001-11-20</entry>
1891       <entry>patches available in archives, but too late for 7.2</entry>
1892      </row>
1893      <row>
1894       <entry><systemitem class="osname">SCO OpenServer</></entry>
1895       <entry><systemitem>x86</></entry>
1896       <entry>7.3.1</entry>
1897       <entry>Shibashish Satpathy (<email>shib@postmark.net</>), 2002-12-11</entry>
1898       <entry>5.0.4, <command>gcc</>;  see also <filename>doc/FAQ_SCO</filename></entry>
1899      </row>
1900      <row>
1901       <entry><systemitem class="osname">SunOS 4</></entry>
1902       <entry><systemitem>Sparc</></entry>
1903       <entry>7.2</entry>
1904       <entry>Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>), 2001-12-04</entry>
1905       <entry></entry>
1906      </row>
1907     </tbody>
1908    </tgroup>
1909   </informaltable>
1910  </sect1>
1911
1912 </chapter>
1913
1914 <!-- Keep this comment at the end of the file
1915 Local variables:
1916 mode:sgml
1917 sgml-omittag:nil
1918 sgml-shorttag:t
1919 sgml-minimize-attributes:nil
1920 sgml-always-quote-attributes:t
1921 sgml-indent-step:1
1922 sgml-indent-tabs-mode:nil
1923 sgml-indent-data:t
1924 sgml-parent-document:nil
1925 sgml-default-dtd-file:"./reference.ced"
1926 sgml-exposed-tags:nil
1927 sgml-local-catalogs:("/usr/share/sgml/catalog")
1928 sgml-local-ecat-files:nil
1929 End:
1930 -->