Skip to content

Commit ab5910a

Browse files
committed
From: David Friend <dfriend@atlsci.atlsci.com>
Here are the latest changes to the INSTALL instructions. The main changes are: - Step 5, on flex - Steps 18 and 19, on regression tests - Step 22 c) on starting postmaster on bootup on FreeBSD - Added porting notes for SPARC/Linux at end. If there is time, Thomas should review step 19.
1 parent 51e0fe5 commit ab5910a

File tree

1 file changed

+76
-20
lines changed

1 file changed

+76
-20
lines changed

INSTALL

Lines changed: 76 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ To upgrade to PostgreSQL v6.1 do the following:
9090
is 2.5.3 or before 2.5.2 then you will have to upgrade flex. You may
9191
get it at ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz.
9292

93+
If you need flex and don't have it or have the wrong version, then
94+
you will be told so when you attempt to compile the program. Feel
95+
free to skip this step if you aren't sure you need it. If you do
96+
need it then you will be told to install/upgrade flex when you try to
97+
compile.
98+
9399
To install it, type the following:
94100
cd
95101
gunzip -c flex-2.5.4.tar.gz | tar xvf -
@@ -106,10 +112,6 @@ To upgrade to PostgreSQL v6.1 do the following:
106112
/usr/lib/libfl.a, /usr/include/FlexLexer.h and will add link
107113
/usr/bin/flex++ which points to flex.
108114

109-
If you have flex v2.5.3 and do not have handy access to the
110-
internet, you can apply the patch in /usr/src/pgsql/doc/README.flex
111-
instead.
112-
113115
6) If you are upgrading an existing system from any version before
114116
version 6.1 beta release 970512 then back up the current
115117
database. Type
@@ -162,12 +164,10 @@ To upgrade to PostgreSQL v6.1 do the following:
162164
su
163165
cd /usr/src
164166
mkdir pgsql
165-
chown postgres pgsql
166-
chgrp postgres pgsql
167+
chown postgres:postgres pgsql
167168
cd /usr/local
168169
mkdir pgsql
169-
chown postgres pgsql
170-
chgrp postgres pgsql
170+
chown postgres:postgres pgsql
171171
exit
172172

173173
10) Unzip and untar the new source file. Type
@@ -316,7 +316,10 @@ To upgrade to PostgreSQL v6.1 do the following:
316316
your old database on top of the one in your new database, rather than
317317
redoing this from scratch.
318318

319-
18) Start the postmaster in preparation for the regression tests. First,
319+
18) If you wish to skip the regression tests then skip to step 21.
320+
However, we think skipping the tests is a BAD idea!
321+
322+
Start the postmaster in preparation for the regression tests. First,
320323
set the timezone for Berkley, California. On some systems you may do
321324
this by setting environment variable TZ. I.e., using bash, type
322325
export TZ=PST8PDT7,M04.01.0,M10.0503
@@ -338,11 +341,30 @@ To upgrade to PostgreSQL v6.1 do the following:
338341
You should get on the screen (and also written to file ./regress.out)
339342
a series of statements stating which tests passed and which tests
340343
failed. Please note that it is normal for some of the tests to
341-
"fail". For the failed tests, use diff to compare the files in
342-
directories ./results and ./expected. "Failed" tests may have
343-
failed due to slightly different error messages, output formatting,
344-
failure to set the timezone correctly for your platform, etc.
345-
"Failures" of this type do not indicate a problem with PostgreSQL.
344+
"fail".
345+
346+
For the tests that failed, i.e. if float8 failed, type something like:
347+
cd /usr/src/pgsql/src/test/regress
348+
diff -w expected/float8.out results
349+
Now do some intelligent interpretation of what you see before
350+
deciding if you have detected a bug in PostgreSQL as it compiled on
351+
you platform.
352+
353+
For example. On a SPARC/Linux-elf platform using the 970516 beta
354+
version of PostgreSQL v6.1 the following tests "failed". float8
355+
and geometry "failed" due to minor precision differences in floating
356+
point numbers. timespan and horology had different values from the
357+
expected "14 secs ago". (This may be a real bug. It may simply be
358+
problems with convincing the back end what timezone and time to
359+
use.) datetime, abstime and tinterval failed because it used GMT
360+
where it should have used PST and PDT. (Same comment.) select_views
361+
failed for unknown reasons. Conclusion? There may be some real
362+
bugs exhibited here but will they effect what you intend to use
363+
PostgreSQL for? (Note: Most of these bugs also occur on the
364+
i86/Linux platform. Also note that there will be significant
365+
changes made to the date and time types immediately after the
366+
v6.1 release so if you do need these functions, monitor the HACKERS
367+
and PORTS mailing lists to see what is going on.)
346368

347369
After running the tests, type
348370
cd /usr/src/pgsql/src/test/regress
@@ -387,13 +409,21 @@ To upgrade to PostgreSQL v6.1 do the following:
387409
postmaster if it dies, but he doesn't know if there are other side
388410
effects.)
389411

390-
c) In FreeBSD edit /usr/local/etc/rc.d/pgsql.sh to contain the
391-
following two lines, and make it 755 root:bin :
412+
c) In FreeBSD 2.2-RELEASE edit /usr/local/etc/rc.d/pgsql.sh to
413+
contain the following lines and make it chmod 755 and chown
414+
root:bin.
392415
#!/bin/sh
393-
[ -x /usr/local/pgsql/bin/postmaster ] &&
394-
su -l pgsql -c '/usr/local/pgsql/bin/postmaster
395-
-D/usr/local/pgsql/data -o -F > /usr/local/pgsql/errlog
396-
&' && echo -n ' pgsql'
416+
[ -x /usr/local/pgsql/bin/postmaster ] && {
417+
su -l pgsql -c 'exec /usr/local/pgsql/bin/postmaster
418+
-D/usr/local/pgsql/data
419+
-S -o -F > /usr/local/pgsql/errlog' &
420+
echo -n ' pgsql'
421+
}
422+
You may put the line breaks as shown above. The shell is smart
423+
enough to keep parsing beyond end-of-line if there is an
424+
expression unfinished. The exec saves one layer of shell under
425+
the postmaster process so the parent is init. Note: Unlike the
426+
other examples, this one has been tested.
397427

398428
d) In RedHat v4.0 Linux create file /etc/rc.d/init.d/postgres.init to
399429
contain the following single line:
@@ -551,3 +581,29 @@ NeXT:
551581
binary releases of PostgreSQL for NEXTSTEP will be made available to
552582
the general public. Contact Info@RnA.nl for information.
553583

584+
SPARC Linux-elf:
585+
There was not time to finish adding support for this in the v6.1
586+
release. However, if you are running RedHat Linux v4.0 on a
587+
SPARC platform then install flex v2.5.4 and tell configure you
588+
have a Linux-elf platform. Between configuring and compiling
589+
PostgreSQL, edit the following files:
590+
1) Edit src/GNUmakefile to comment out the call to lexflex and
591+
the if-then-else test that follows it. (This may not be
592+
necessary by the time v6.1 gets released.)
593+
2) Edit src/Makefile.global to change "-O2" to "-O".
594+
3) Edit src/backend/libpq/pqcomprim.c, near the start to replace
595+
#ifdef HAVE_ENDIAN_H
596+
# include <endian.h>
597+
#endif
598+
with
599+
/*
600+
#ifdef HAVE_ENDIAN_H
601+
# include <endian.h>
602+
#endif
603+
*/
604+
#define BYTE_ORDER LITTLE_ENDIAN
605+
If you want to know the reasonilng behind the above instructions
606+
then look in ftp://ftp.postgresql.org/pub/majordomo/ports for a
607+
May 16, 1997 mail message called "regression tests on a
608+
SPARC/Linux platform".
609+

0 commit comments

Comments
 (0)