Skip to content

Commit b072cd4

Browse files
author
Thomas G. Lockhart
committed
Add information on regression testing and Linux ports.
Fix typos in TZ setting for regression testing and in gmake redirection.
1 parent 0c3b6e6 commit b072cd4

File tree

1 file changed

+84
-57
lines changed

1 file changed

+84
-57
lines changed

INSTALL

Lines changed: 84 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ list. Version 1 (through 1.01) was developed by Jolly Chen and Andrew
1616
Yu.
1717

1818
The installation notes below assume the following (except where noted):
19-
- Commands were tested on RedHat Linux version 4.0 using the bash
20-
shell. Except where noted, they will probably work on most
21-
systems. USE COMMON SENSE before typing in these commands.
22-
Commands like ps and tar vary wildly on what options you should
23-
use on each platform.
24-
- Defaults are assumed.
19+
- Commands are Unix-compatible. See note below.
20+
- Defaults are used except where noted.
2521
- User postgres is the postgres superuser.
22+
- The source path is /usr/src/pgsql (other paths are possible).
23+
- The runtime path is /usr/local/pgsql (other paths are possible).
24+
25+
Commands were tested on RedHat Linux version 4.0 using the bash shell.
26+
Except where noted, they will probably work on most systems. Commands
27+
like ps and tar vary wildly on what options you should use on each
28+
platform. USE COMMON SENSE before typing in these commands.
2629

2730
Our Makefiles require GNU make (called gmake in this document) and
2831
also assume that "install" accepts BSD options. The INSTALL
@@ -45,7 +48,7 @@ PostgreSQL has been tested on the following platforms:
4548
hpux HP PA-RISC on HP-UX 9.0
4649
i386_solaris i386 Solaris
4750
irix5 SGI MIPS on IRIX 5.3
48-
linux Intel x86 on Linux 1.2 and Linux ELF
51+
linux Intel x86 on Linux 2.0 and Linux ELF
4952
(For non-ELF Linux, see LINUX_ELF below).
5053
sparc_solaris SUN SPARC on Solaris 2.4
5154
sunos4 SUN SPARC on SunOS 4.1.3
@@ -160,7 +163,10 @@ To upgrade to PostgreSQL v6.1 do the following:
160163
else) then you will also want to move this directory in the same
161164
manner.
162165

163-
9) Make new source and install directories. Type
166+
9) Make new source and install directories. The actual paths can be
167+
different for your installation; be consistant with your configuration
168+
in step (11).
169+
Type
164170
su
165171
cd /usr/src
166172
mkdir pgsql
@@ -174,7 +180,9 @@ To upgrade to PostgreSQL v6.1 do the following:
174180
cd /usr/src/pgsql
175181
gunzip -c ~/postgresql-v6.1.tar.gz | tar xvf -
176182

177-
11) Configure the source code for your system. Type
183+
11) Configure the source code for your system. It is this step at which
184+
you can specify your actual source path and installation paths for
185+
the build process (see the --prefix option below). Type
178186
cd /usr/src/pgsql/src
179187
./configure
180188

@@ -236,8 +244,9 @@ To upgrade to PostgreSQL v6.1 do the following:
236244

237245
12) Compile the program. Type
238246
cd /usr/src/pgsql/src
239-
gmake all &> make.log &
247+
gmake all >& make.log &
240248
tail -f make.log
249+
241250
The last line displayed will hopefully be "All of PostgreSQL is
242251
successfully made. Ready to install." At this point, or earlier
243252
if you wish, type control-C to get out of tail. (If you have
@@ -258,8 +267,9 @@ To upgrade to PostgreSQL v6.1 do the following:
258267

259268
13) Install the program. Type
260269
cd /usr/src/pgsql/src
261-
gmake install &> make.install.log &
270+
gmake install >& make.install.log &
262271
tail -f make.install.log
272+
263273
The last line displayed will be "gmake[1]: Leaving directory
264274
`/usr/src/pgsql/src/man'". At this point, or earlier if you wish,
265275
type control-C to get out of tail.
@@ -320,12 +330,14 @@ To upgrade to PostgreSQL v6.1 do the following:
320330
However, we think skipping the tests is a BAD idea!
321331

322332
Start the postmaster in preparation for the regression tests. First,
323-
set the timezone for Berkley, California. On some systems you may do
333+
set the timezone for Berkeley, California. On some systems you may do
324334
this by setting environment variable TZ. I.e., using bash, type
325-
export TZ=PST8PDT7,M04.01.0,M10.0503
335+
export TZ=PST8PDT7,M04.01.0,M10.05.03
336+
326337
Now start the postmaster daemon running in the background by typing
327338
cd
328339
nohup postmaster > regress.log 2>&1 &
340+
329341
Run postmaster from your postgres super user account (typically
330342
account postgres). DO NOT RUN POSTMASTER FROM THE ROOT ACCOUNT.
331343

@@ -340,31 +352,40 @@ To upgrade to PostgreSQL v6.1 do the following:
340352

341353
You should get on the screen (and also written to file ./regress.out)
342354
a series of statements stating which tests passed and which tests
343-
failed. Please note that it is normal for some of the tests to
344-
"fail".
345-
346-
For the tests that failed, i.e. if float8 failed, type something like:
355+
failed. Please note that it can be normal for some of the tests to
356+
"fail". For the failed tests, use diff to compare the files in
357+
directories ./results and ./expected. If float8 failed, type
358+
something like:
347359
cd /usr/src/pgsql/src/test/regress
348360
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.)
361+
362+
"Failed" tests may have failed due to slightly different error messages,
363+
output formatting, failure to set the timezone correctly for your
364+
platform, etc. "Failures" of this type do not indicate a problem with
365+
PostgreSQL.
366+
367+
Here is an example from a i686/Linux-ELF platform (this is the platform
368+
on which most of the regression tests were generated). float8 failed
369+
on exponentiation and logarithmic operations due to known differences
370+
in error handling for those math functions between this platform
371+
and the original Sun (?) Postgres v4.2 development environment.
372+
373+
Here is an example from a SPARC/Linux-ELF platform (note that this is
374+
for an "unsupported" platform). Using the 970516 beta version of
375+
PostgreSQL v6.1 the following tests "failed". float8 and geometry
376+
"failed" due to minor precision differences in floating point numbers.
377+
timespan and horology had different values from the expected
378+
"14 secs ago". datetime, abstime and tinterval had "GMT" for the time
379+
zone rather than "PST" or "PDT". These differences were due to a
380+
mis-typed string for the TZ environment variable from step (18).
381+
select_views failed for unknown reasons.
382+
383+
Conclusion? If you do see failures, try to understand the nature of
384+
the differences and then decide if those differences will affect your
385+
intended use of PostgreSQL. However, keep in mind that this is likely
386+
to be the most solid release of PostgreSQL to date, incorporating many
387+
bug fixes from v6.0, and that previous versions of PostgreSQL has been
388+
in use successfully for some time now.
368389

369390
After running the tests, type
370391
cd /usr/src/pgsql/src/test/regress
@@ -508,19 +529,20 @@ Create the database foo:
508529
template1=> CREATE DATABASE FOO;
509530
INSERT 773248
510531

511-
(Don't ever forget those SQL semicolons. Psql won't execute anything until it
512-
sees the semicolon.)
532+
(Get in the habit of including those SQL semicolons. Psql won't execute
533+
anything until it sees the semicolon or a "\g" and the semicolon is required
534+
to delimit multiple statements.)
513535

514536
template1=> \c foo
515537
closing connection to database: template1
516538
connecting to new database: foo
517539

518540
(\ commands aren't SQL, so no semicolon. Use \? to see all the \ commands.)
519541

520-
template1=> CREATE TABLE bar (column1 int4, column2 char16);
542+
foo=> CREATE TABLE bar (column1 int4, column2 char16);
521543
CREATE
522544

523-
template1=> \d bar
545+
foo=> \d bar
524546

525547
...
526548

@@ -553,25 +575,31 @@ Ultrix4.x:
553575
s2k-ftp.CS.Berkeley.EDU:pub/personal/andrew/libdl-1.1.tar.Z
554576

555577
Linux:
556-
The linux port defaults to the ELF binary format. (Note that if you're
557-
using ELF, you don't need dld because you'll be using the dl library
558-
that comes with Linux ELF instead.)
559-
560-
To compile on non-ELF Linux, comment out the LINUX_ELF line in
561-
src/mk/port/postgres.mk.linux. Also, the dld library MUST be obtained
562-
and installed on the system. It enables dynamic link loading capability
563-
to the postgres port. The dld library can be obtained from the sunsite
564-
linux distributions. The current name is dld-3.2.5.
578+
The linux-elf port installs cleanly. If you are using an
579+
i486 processor or higher, you can edit template/linux-elf
580+
to include "-m486" as a compiler option. configure does not
581+
detect that sigsetjmp() is available, but you can edit
582+
include/config.h after running configure and before running
583+
make to include "#define HAVE_SIGSETJMP 1". Note that I have
584+
not seen any difference in PostgreSQL behavior either way.
585+
(Thomas G. Lockhart
586+
<Thomas.Lockhart@jpl.nasa.gov> 97/05/17)
587+
588+
For non-ELF Linux, the dld library MUST be obtained and installed on
589+
the system. It enables dynamic link loading capability to the postgres
590+
port. The dld library can be obtained from the sunsite linux
591+
distributions. The current name is dld-3.2.5.
565592
(Jalon Q. Zimmerman
566593
<sneaker@powergrid.electriciti.com> 5/11/95)
567594

568-
To compile with flex, you need a recent version (2.5.2 or
595+
To compile with flex, you need a recent version (v2.5.2 or v2.5.4 or
569596
later). Otherwise, you will get a 'yy_flush_buffer' undefined error.
570597
Note, however, that flex v2.5.3 has a bug. See the FAQs.
571598

572599
BSD/OS:
573-
For BSD/OS 2.0 and 2.01, you will need to get flex version 2.5.2
574-
as well as the GNU dld library. Flex version 2.5.3 has a known bug.
600+
For BSD/OS 2.0 and 2.01, you will need to get flex version 2.5.2 or
601+
flex version 2.5.4 as well as the GNU dld library.
602+
Flex version 2.5.3 has a known bug on all platforms.
575603

576604
NeXT:
577605
The NeXT port was supplied by Tom R. Hageman <tom@basil.icce.rug.nl>.
@@ -585,8 +613,8 @@ SPARC Linux-elf:
585613
There was not time to finish adding support for this in the v6.1
586614
release. However, if you are running RedHat Linux v4.0 on a
587615
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:
616+
have a "linux-elf" platform. After running "configure" and before
617+
compiling PostgreSQL, make the following changes:
590618
1) Edit src/GNUmakefile to comment out the call to lexflex and
591619
the if-then-else test that follows it. (This may not be
592620
necessary by the time v6.1 gets released.)
@@ -602,8 +630,7 @@ SPARC Linux-elf:
602630
#endif
603631
*/
604632
#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
633+
For more details, look in ftp://ftp.postgresql.org/pub/majordomo/ports
634+
for a May 16, 1997 mail message called "regression tests on a
608635
SPARC/Linux platform".
609636

0 commit comments

Comments
 (0)