33
44<Abstract>
55<Para>
6- Complete installation instructions for <ProductName>Postgres</ProductName> v6.3.
6+ Complete installation instructions for <ProductName>Postgres</ProductName>
7+ v6.4.
78</Para>
89</Abstract>
910
1011<Para>
11- This procedure is
12- This is based on the installation instructions
13- for <ProductName>Postgres</ProductName> v6.3
14- found in <FileName>$PGROOT/INSTALL</FileName>.
15- Up to date information on <ProductName>Postgres</ProductName> may be found at
16- <ULink url="http://www.postgresql.org">www.postgresql.org</ULink>.
12+ Before installing <ProductName>Postgres</ProductName>, you may wish to visit
13+ <ULink url="http://www.postgresql.org">www.postgresql.org</ULink>
14+ for up to date information, patches, etc.
1715</Para>
1816
1917<Para>
@@ -54,19 +52,19 @@ platform. <Emphasis>Use common sense</Emphasis> before typing in these commands.
5452</Para>
5553
5654<Para>
57- Our Makefiles require GNU <Application>make</Application> (called <Quote>gmake</Quote> in this document) and
58- also assume that <Application>install</Application> accepts BSD options. The INSTALL
59- variable in the Makefiles is set to the BSD-compatible version of
60- <Application>install </Application>. On some systems, you will have to find a BSD-compatible
61- <Application>install</Application> (eg. <Application>bsdinst</Application >,which comes with the MIT X Window System
62- distribution) .
55+ Our Makefiles require GNU <Application>make</Application> (called
56+ <Quote>gmake</Quote> in this document). They will <Emphasis>not</Emphasis>
57+ work with non-GNU <Application>make</Application> programs. If you
58+ have GNU <Application>make </Application> installed under the name
59+ <Quote>make</Quote> instead of <Quote>gmake</Quote >,that's OK, but
60+ you need to have it .
6361</Para>
6462
6563<Sect1>
6664<Title>Requirements to Run <ProductName>Postgres</ProductName></Title>
6765
6866<Para>
69- Information on supported platforms is another chapter. In general, most Unix-compatible
67+ Information on supported platforms isin another chapter. In general, most Unix-compatible
7068platforms with modern libraries should be able to run <ProductName>Postgres</ProductName>.
7169
7270<Para>
@@ -155,7 +153,7 @@ Check that you have sufficient disk space. You will need about
155153
156154<Step Performance="required">
157155<Para>
158- Ftp file ftp://ftp.postgresql.org/pub/postgresql-v6.3 .tar.gz from the
156+ Ftp file ftp://ftp.postgresql.org/pub/postgresql-v6.4 .tar.gz from the
159157 Internet. Store it in your home directory.
160158</Para>
161159</Step>
@@ -217,7 +215,7 @@ If you are upgrading an existing system then back up your database.
217215 and the following line typed as one line):
218216<ProgramListing>
219217 cd
220- gunzip -c postgresql-v6.3 .tar.gz |
218+ gunzip -c postgresql-v6.4 .tar.gz |
221219 tar xvf - src/bin/pg_dump/pg_dumpall
222220 chmod a+x src/bin/pg_dump/pg_dumpall
223221 src/bin/pg_dump/pg_dumpall > db.out
@@ -316,67 +314,79 @@ If you are upgrading an existing system then move the old directories
316314 Unzip and untar the new source file. Type
317315<ProgramListing>
318316 cd /usr/src/pgsql
319- gunzip -c ~/postgresql-v6.3 .tar.gz | tar xvf -
317+ gunzip -c ~/postgresql-v6.4 .tar.gz | tar xvf -
320318</ProgramListing>
321319</Para>
322320</Step>
323321
324322<Step Performance="required">
325323<Para>
326324 Configure the source code for your system. It is this step at which
327- you can specify your actualsource path and installationpaths for
325+ you can specify your actual installationpath for
328326 the build process (see the --prefix option below). Type
329327<ProgramListing>
330328 cd /usr/src/pgsql/src
331- ./configure
329+ ./configure [ options as described below ]
332330</ProgramListing>
333331</Para>
334332
335333<Para>
336- The configure program will list the template files available and
337- ask you to choose one. A lot of times, an appropriate template
338- file is chosen for you, and you can just press Enter to accept the
339- default. If the default is not appropriate, then type in the
340- appropriate template file and press Enter. (If you do this, then
334+ Among other chores, the configure script selects a system-specific
335+ "template" file from the files provided in the template subdirectory.
336+ If it cannot guess which one to use for your system, it will say so and
337+ exit. In that case you'll need to figure out which one to use and run
338+ configure again, this time giving the --with-template=TEMPLATE option to
339+ make the right file be chosen. (If you have to do this, please
341340 send email to scrappy@hub.org stating the output of the program
342341 './config.guess' and what the template file should be.)
343342</Para>
344343
345344<Para>
346- Once you have entered the template file, youwill be asked a
347- number of questions about your particular configuration.These
348- can be skipped by adding parameters to the configure command above.
349- The following parameters can be tagged onto the end of the configure
350- command:
351-
345+ The configure script accepts many additional options that youcan use
346+ if you don't like the default configuration.To see them all, type
347+ <ProgramListing>
348+ ./ configure --help
349+ </ProgramListing>
350+ Some of the more commonly used ones are:
352351<ProgramListing>
353352 --prefix=BASEDIR Selects a different base directory for the
354353 installation of the <ProductName>Postgres</ProductName> configuration.
355354 The default is /usr/local/pgsql.
356355
356+ --with-template=TEMPLATE
357+ Use template file TEMPLATE - the template
358+ files are assumed to be in the directory
359+ src/template, so look there for proper values.
360+
361+ --with-pgport=PORT Sets the port that the postmaster process
362+ listens for incoming connections on. The
363+ default is port 5432.
364+
365+ --with-tcl Build interface libraries and programs requiring
366+ Tcl/Tk, including libpgtcl, pgtclsh, and pgtksh.
367+
368+ --with-perl Build the Perl interface library.
369+
370+ --with-odbc Build the ODBC driver package.
371+
357372 --enable-hba Enables Host Based Authentication (DEFAULT)
358373
359374 --disable-hba Disables Host Based Authentication
360375
361376 --enable-locale Enables USE_LOCALE
362377
363- --disable-locale Disables USE_LOCALE (DEFAULT)
364-
365378 --enable-cassert Enables ASSERT_CHECKING
366379
367- --disable-cassert Disables ASSERT_CHECKING (DEFAULT)
368-
369- --with-template=TEMPLATE
370- Use template file TEMPLATE - the template
371- files are assumed to be in the directory
372- src/template, so look there for proper values.
373- (If the configure script cannot find the
374- specified template file, it will ask you for
375- one).
380+ --with-CC=compiler
381+ Use a specific C compiler that the configure
382+ script cannot find.
376383
377- --with-pgport=PORT Sets the port that the postmaster process
378- listens for incoming connections on. The
379- default for this is port 5432.
384+ --with-CXX=compiler
385+ --without-CXX
386+ Use a specific C++ compiler that the configure
387+ script cannot find, or exclude C++ compilation
388+ altogether. (This only affects libpq++ at
389+ present.)
380390</ProgramListing>
381391</Para>
382392
@@ -547,85 +557,76 @@ Compile the program. Type
547557 included in the file. (If your database is not located in the
548558 default location, i.e. if PGDATA is set to point elsewhere, then the
549559 location of this file will change accordingly.) This file should be
550- made read only again once you arefinsihed .
560+ made read only again once you arefinished .
551561
552- If you are upgrading from v6.0 you can copy file pg_hba.conf from
562+ If you are upgrading from v6.0or later you can copy file pg_hba.conf from
553563 your old database on top of the one in your new database, rather than
554- redoingthis from scratch.
564+ redoingthe file from scratch.
555565</Para>
556566</Step>
557567
558568<Step Performance="required">
559569<Para>
560- You may wish to skip the regression tests.
561- However, we think skipping the tests is a BAD idea!
562- </Para>
563-
564- <Para>
565- The file /usr/src/pgsql/src/test/regress/README has detailed
566- instructions for running and interpreting the regression tests.
567- A short version follows here:
568- </Para>
569570
570- <Para>
571- Start the postmaster daemon running in the background by typing
571+ Start the postmaster daemon running. Type
572572<ProgramListing>
573573 cd
574- nohup postmaster >regress .log 2>&1 &
574+ nohup postmaster >server .log 2>&1 &
575575</ProgramListing>
576- </Para>
577-
578- <Para>
579576 Run postmaster from your <ProductName>Postgres</ProductName> super user account (typically
580577 account postgres). DO NOT RUN POSTMASTER FROM THE ROOT ACCOUNT.
581578</Para>
582579</Step>
583580
584581<Step Performance="required">
585582<Para>
583+ Run the regression tests.
584+ (You can skip this step if you wish, but
585+ we think skipping the tests is a BAD idea!)
586+ </Para>
586587
587- Run the regression tests. Type
588+ <Para>
589+ The file /usr/src/pgsql/src/test/regress/README has detailed
590+ instructions for running and interpreting the regression tests.
591+ A short version follows here:
592+ </Para>
588593
594+ <Step Performance="required">
595+ <Para>
596+ Type
589597<ProgramListing>
590- cd
591598 cd /usr/src/pgsql/src/test/regress
592599 gmake clean
593600 gmake all runtest
594601</ProgramListing>
595602</Para>
596603
597604<Para>
598-
599605 You do not need to type "gmake clean" if this is the first time you
600606 are running the tests.
601607</Para>
602608
603609<Para>
604-
605610 You should get on the screen (and also written to file ./regress.out)
606611 a series of statements stating which tests passed and which tests
607612 failed. Please note that it can be normal for some of the tests to
608- "fail". For the failed tests, use diff to compare the files in
609- directories ./results and ./expected. If float8 failed, type
610- something like:
611- <ProgramListing>
612- cd /usr/src/pgsql/src/test/regress
613- diff -w expected/float8.out results
614- </ProgramListing>
615- </Para>
616-
617- <Para>
618-
619- "Failed" tests may have failed due to slightly different error messages,
620- output formatting, failure to set the timezone correctly for your
621- platform, etc. "Failures" of this type do not indicate a problem with
613+ "fail". The script says a test has failed if there is any difference
614+ at all between the actual output of the test and the expected output.
615+ Thus, tests may "fail" due to minor differences in wording of error
616+ messages, small differences in floating-point roundoff, etc, between
617+ your system and the regression test reference platform.
618+ "Failures" of this type do not indicate a problem with
622619 <ProductName>Postgres</ProductName>.
620+ The file ./regression.diffs contains the textual differences between
621+ the actual test output on your machine and the "expected" output
622+ (which is simply what the reference system produced). You should
623+ carefully examine each difference listed to see whether it appears to
624+ be a significant issue.
623625</Para>
624626
625627<Para>
626-
627628 For a i686/Linux-ELF platform, no tests failed since this is the
628- v6.3 regression testing reference platform.
629+ v6.4 regression testing reference platform.
629630</Para>
630631
631632<Para>
@@ -636,45 +637,31 @@ You may wish to skip the regression tests.
636637 but the differences are due to minor floating point differences.
637638</Para>
638639
640+ <Para>
641+ Even if a test result clearly indicates a real failure, it may be a
642+ localized problem that will not affect you. An example is that the
643+ int8 test will fail, producing obviously incorrect output, if your
644+ machine and C compiler do not provide a 64-bit integer data type
645+ (or if they do but configure didn't discover it). This is not
646+ something to worry about unless you need to store 64-bit integers.
647+ </Para>
648+
639649<Para>
640650 Conclusion? If you do see failures, try to understand the nature of
641651 the differences and then decide if those differences will affect your
642- intended use of <ProductName>Postgres</ProductName>. However, keep in mind that this is likely
643- to be the most solid release of <ProductName>Postgres</ProductName> to date, incorporating many
644- bug fixes from v6.2.1, and that previous versions of <ProductName>Postgres</ProductName> have been
645- in use successfully for some time now.
652+ intended use of <ProductName>Postgres</ProductName>. The regression
653+ tests are a helpful tool, but they require some study to be useful.
646654</Para>
647655
648656<Para>
649- After running the tests, type
657+ After running theregression tests, type
650658<ProgramListing>
651659 destroydb regression
652660 cd /usr/src/pgsql/src/test/regress
653661 gmake clean
654662</ProgramListing>
655- </Para>
656- </Step>
657-
658- <Step Performance="required">
659- <Para>
660-
661- Stop the postmaster as described in step 7. Then restore the
662- timezone to it's normal setting. If you changed the timezone by
663- modifying environment variable TZ then one way to do this is to
664- log out of, then back into, account postgres.
665- </Para>
666- </Step>
667-
668- <Step Performance="required">
669- <Para>
670-
671- Start the postmaster daemon running. Type
672- <ProgramListing>
673- cd
674- nohup postmaster > server.log 2>&1 &
675- </ProgramListing>
676- Run postmaster from your <ProductName>Postgres</ProductName> super user account (typically
677- account postgres). DO NOT RUN POSTMASTER FROM THE ROOT ACCOUNT.
663+ to recover the disk space used for the tests. (You may want to save
664+ the regression.diffs file in another place before doing this.)
678665</Para>
679666</Step>
680667
@@ -715,11 +702,11 @@ You may wish to skip the regression tests.
715702 the postmaster process so the parent is init. Note: Unlike most
716703 other examples, this one has been tested.
717704
718- c) In RedHat v4.0 Linux edit file /etc/inittab tocontain the
705+ c) In RedHat v4.0 Linux edit file /etc/inittab toadd the
719706 following single line:
720707 pg:2345:respawn:/bin/su - postgres -c
721708 "/usr/local/pgsql/bin/postmaster -D/usr/local/pgsql/data
722- >> /usr/local/pgsql/server.log 2>&1" /dev/null
709+ >> /usr/local/pgsql/server.log 2>&1 < /dev/null"
723710 (The author of this example says this example will revive the
724711 postmaster if it dies, but he doesn't know if there are other side
725712 effects.)
@@ -750,7 +737,7 @@ You may wish to skip the regression tests.
750737
751738<Step Performance="required">
752739<Para>
753- If you are upgrading an existing system theninstall your old database.
740+ If you are upgrading an existing system thenreinstall your old database.
754741 Type
755742<ProgramListing>
756743 cd