head	1.25;
access;
symbols;
locks; strict;
comment	@.\" @;


1.25
date	92.08.27.06.08.25;	author mer;	state Exp;
branches;
next	1.24;

1.24
date	92.07.20.18.33.04;	author frew;	state Exp;
branches;
next	1.23;

1.23
date	91.12.02.10.16.38;	author postgres;	state Exp;
branches;
next	1.22;

1.22
date	91.12.02.04.15.58;	author kemnitz;	state Exp;
branches;
next	1.21;

1.21
date	91.08.18.07.51.47;	author kemnitz;	state Exp;
branches;
next	1.20;

1.20
date	91.08.18.05.41.18;	author kemnitz;	state Exp;
branches;
next	1.19;

1.19
date	91.08.18.05.12.25;	author kemnitz;	state Exp;
branches;
next	1.18;

1.18
date	91.08.18.03.39.50;	author kemnitz;	state Exp;
branches;
next	1.17;

1.17
date	91.08.18.02.38.57;	author kemnitz;	state Exp;
branches;
next	1.16;

1.16
date	91.08.18.02.31.52;	author kemnitz;	state Exp;
branches;
next	1.15;

1.15
date	91.08.16.04.21.21;	author kemnitz;	state Exp;
branches;
next	1.14;

1.14
date	91.03.09.05.00.09;	author kemnitz;	state Exp;
branches;
next	1.13;

1.13
date	91.03.07.03.45.05;	author kemnitz;	state Exp;
branches;
next	1.12;

1.12
date	91.01.15.18.00.07;	author kemnitz;	state Exp;
branches;
next	1.11;

1.11
date	90.11.01.17.00.14;	author kemnitz;	state Exp;
branches;
next	1.10;

1.10
date	90.10.28.13.57.01;	author kemnitz;	state Exp;
branches;
next	1.9;

1.9
date	90.10.28.13.54.37;	author kemnitz;	state Exp;
branches;
next	1.8;

1.8
date	90.10.27.20.10.59;	author kemnitz;	state Exp;
branches;
next	1.7;

1.7
date	90.10.27.19.57.35;	author kemnitz;	state Exp;
branches;
next	1.6;

1.6
date	90.10.27.19.52.29;	author kemnitz;	state Exp;
branches;
next	1.5;

1.5
date	90.10.27.19.48.23;	author kemnitz;	state Exp;
branches;
next	1.4;

1.4
date	90.10.27.18.52.01;	author kemnitz;	state Exp;
branches;
next	1.3;

1.3
date	90.10.27.17.31.26;	author kemnitz;	state Exp;
branches;
next	1.2;

1.2
date	90.07.30.17.07.18;	author kemnitz;	state Exp;
branches;
next	1.1;

1.1
date	90.07.30.13.24.20;	author kemnitz;	state Exp;
branches;
next	;


desc
@Release notes.
@


1.25
log
@changes for 4.0.1
@
text
@.\" 
.\" POSTGRES Data Base Management System
.\" 
.\" Copyright (c) 1988 Regents of the University of California
.\" 
.\" Permission to use, copy, modify, and distribute this software and its
.\" documentation for educational, research, and non-profit purposes and
.\" without fee is hereby granted, provided that the above copyright
.\" notice appear in all copies and that both that copyright notice and
.\" this permission notice appear in supporting documentation, and that
.\" the name of the University of California not be used in advertising
.\" or publicity pertaining to distribution of the software without
.\" specific, written prior permission.  Permission to incorporate this
.\" software into commercial products can be obtained from the Campus
.\" Software Office, 295 Evans Hall, University of California, Berkeley,
.\" Ca., 94720.  The University of California makes no representations
.\" about the suitability of this software for any purpose.  It is
.\" provided "as is" without express or implied warranty.
.\" 
.\" ----------------------------------------------------------------
.\"	POSTGRES version 4.0.1 setup instructions
.\"
.\" ----------------------------------------------------------------
.de RV
.ie "\\$2"" \
\{\
.	ds VT "<No Title>
.	ds VN "<Unaudited Revision>
.	ds VD \*(td
.\}
.el \
\{\
.	ds VT \\$7
.	ds VD \\$4
.	ds VN \\$3
.\}
..
.hx
.fo ''%''
.ce 99
.ps 18
.b
POSTGRES INSTALLATION INSTRUCTIONS
.r
.ps 14
.sp 0.25v
C-Only Release 4.0.1
.sp 0.25v
.ce 0
.sp
.\" ----------------
.tm    Document Overview
.\" ----------------
.ds PG "\\s-2POSTGRES\\s+2
.sh 0 "Document Overview"
.(l
    Document Overview
    Introduction
    Site Requirements
	Hardware
	Software
	Distribution Tape
	Expertise
	Configuration
	    Operating System
	    Disk Partition
	    Swap Partition
	    Kernel
	    Lisp
    Installing \*(PG
	Overview
	Preparation
	    Finding Space for \*(PG
	    Creating /usr/postgres
	    Creating the \*(lqpostgres\*(rq user
	Loading
	    Loading \*(PG
	Configuration
	    Kernel reconfiguration
	    Configuring \*(PG
	Compiling
	    Compiling \*(PG
	    Creating the initial database
	Testing
	    Testing \*(PG
    Running \*(PG
	The \*(PG Postmaster
	The \*(PG Terminal Monitor
	The \*(PG Backend
	\*(PG Support Programs
    Optional Installation
	Installing LIBPQ, the \*(PG frontend library
	Performance Tuning
	Demo Database
	Minimal Installation
    Documentation
	Printing the Manual and Reference
	    If you do not have a Postscript printer
	Printing the Technical Reports and Tutorials
	    If the directory has a makefile
    Miscellaneous
	Bug Reports
	Known Bug List
	Consulting
	Postgres BBS
.)l
.bp
.\" ----------------
.tm    Introduction
.\" ----------------
.sh 1 "Introduction"
.pp
This document gives installation instructions for the \*(PG
database system under development at the University of
California, Berkeley.
\*(PG is distributed in source code format and is the
property of the Regents of the University of California.
However, the University will grant unlimited commercialization
rights for any derived work on the condition that it
obtain an educational license to the derived work.
For further information, consult the Berkeley Campus
Software Office, 295 Evans Hall, University of
California, Berkeley, CA 94720.
.pp
The University and the \*(PG development group
provide no warranty as to the fitness of the code for
any purpose whatsoever,
and cannot guarantee to assist in fixing problems.
This is *unsupported* software.
.\" ----------------
.tm    Site Requirements
.\" ----------------
.sh 1 "Site Requirements"
.pp
.sh 2 "Hardware"
.pp
\*(PG currently has been tested by the Postgres development team on Sun
Microsystems 3/xx family of
processors with SunOS 3.4, or 3.5, and 4.0, and Sparc architecture machines
(Sparcstation and Sun 4) running SunOS 4.0 and higher.  Postgres is also
supported on DECstations 3100's and 5000's running Ultrix 4.0 and higher.
Tested but unsupported ports for DECstation Ultrix lower than 4.0
are included.  These ports are unsupported for
the following reasons: the old Ultrix dynamic loader is quite buggy.
In order to use \*(PG,
your machine should have at least 8 megabytes of memory
and you will require at least 45 megabytes of disk space
to hold source,
binaries,
and user databases.
If you choose to compile \*(PG for source-level debugging,
you will need roughly twice as much disk space.
See the section on compilation for details.
.pp
The DECstation version requires a kernel which allows 4 megabytes of
shared memory.
.sh 2 "Software"
.pp
This implementation of \*(PG is completely in C.
The distribution contains no Lisp or C++ code.
.sh 2 "Distribution tape"
.pp
These instructions assume you have a \*(PG Version 4.0.1
distribution tape (in either 9 track, SCSI cartridge, or TK50 cartridge
format)
or a \*(PG tar file.
.sh 2 "Expertise"
.pp
Once a site is properly configured and \*(PG is properly installed,
very little UNIX expertise is required to maintain things.
However,
initially setting things up for your site to run \*(PG
may be difficult and we advise that the person installing
\*(PG be familiar with the various system administration
procedures.
Also note that various
steps require superuser authority on the system,
so we advise
that your site's system administrator read this document also.
.sh 2 "Configuration"
.pp
This section briefly describes the configuration you
need to run \*(PG.
Read this to familiarize
yourself with the procedure.
Detailed instructions for making
appropriate modifications to your system are given later in this
document.
.sh 3 "Operating System"
.pp
\*(PG expects things to be configured for BSD by default.
If the default on your site is to use the SunOS SysV compiler
and libraries then you may have to make some changes to this
procedure before compiling \*(PG.
.pp
One exception to this rule is that we use Sun's SysV-compatible
.i make
to build the system.
This is the version of
.i make
that is installed in both the BSD and SysV environments on Suns,
so this should pose no problems on these platforms.  We have no
problems on DECstations either.
.sh 3 "Disk Partition"
.pp
\*(PG requires 45 megabytes of disk space,
preferably on a single partition.
If you don't have enough space,
it is still possible to compile and run \*(PG but you will have to
modify the installation scripts.
.sh 3 "Kernel"
.pp
\*(PG makes use of the optional System V shared memory operations
provided by SunOS, DEC Ultrix, and Dynix,
which require a properly configured kernel which is in general different
than the factory-shipped "generic" kernel.
See the section on kernel configuration for details.
.\" ----------------
.tm    Installation
.\" ----------------
.sh 1 "Installing \*(PG"
.pp
\*(PG installation consists of the following steps:
.ip \0\0\0\(bu
Preparation
.ip \0\0\0\(bu
Loading
.ip \0\0\0\(bu
Configuration
.ip \0\0\0\(bu
Compilation
.ip \0\0\0\(bu
Testing
.lp
Each of these steps is described below.
It is advised that you read over
each of these steps carefully before beginning the installation.
.\" ----------------
.tm    Preparation
.\" ----------------
.sh 2 "Step 1 \- Preparation"
.pp
Some of the tasks involved in this step normally fall in
the domain of the site's system administrator and may require
superuser authority.
If possible,
we advise you to have your
system administrator perform these steps.
.sh 3 "Find a good place for \*(PG"
.pp
You should locate a disk partition with
at least 45 megabytes of free space available for \*(PG.
If you haven't any single partition with 25 megabytes free,
you might have to spread apart the \*(PG directories across several
partitions,
and glue them together with symbolic links.
.sh 3 "Creating the \*(PG directory"
.pp
Once you have located a partition with enough space,
create a directory called
.q postgres
someplace on this partition.
Then \fBcd\fR to this directory and type \fBpwd\fR.
This is the full
path of the directory you will install postgres in.
Write it down in preparation for the next step.
For example:
.sp
.(l
# \fBdf\fR
Filesystem	kbytes	used	avail	capacity  Mounted on
/dev/xy0a	  8421	  6703	  875	   88%	    /
/dev/xy0f	 10829	  6743	 3003	   69%      /pub.MC68020
/dev/xy2h	110811   81181  18548	   81%      /usr3
/dev/xy2g	221279  167405  31746	   84%      /b
/dev/xy1g	221279  138365  60786	   69%      /public
/dev/xy1a	  8179	   944	 6417	   13%      /tmp
/dev/xy0h	119999  101623	 6376	   94%      /usr.MC68020
/dev/xy0g	156033  135499	 4930	   96%      /usr2
/dev/rf0d	539421  465026  20452	   96%      /a
.i
	/public looks like a good place (it has 60 megs free) so we decide
	to create the postgres directory there...
.r
# \fBcd /public\fR
# \fBmkdir postgres\fR
# \fBcd postgres\fR
# \fBpwd\fR
/public/postgres
#
.)l
.sh 2 "Creating /usr/postgres"
.pp
\*(PG expects to be
.i logically
installed in a directory
called
.q /usr/postgres ,
so you must create a symbolic link
from /usr/postgres to whatever directory you created in the
previous step.
In our example,
we would now type:
.sp
.(l
# \fBln -s  /public/postgres  /usr/postgres\fR
.)l
.sh 2 "Creating the \*(lqpostgres\*(rq user"
.pp
Finally, we need to create a user called \*(lqpostgres\*(rq whose
shell is /bin/csh and whose home directory is /usr/postgres.
This can be done using the "adduser" procedures particular to your
platform and site.  See your system administration manual for details.
.lp
.b Note:
.pp
Due to a bug in this release, the "postgres" user must be user 6 (six).
Otherwise, you may encounter problems with backends hanging, etc.
See the 
.b Release
.b Notes
(described in Section 6.2 of this document)
for instructions on how to get around this problem
if it causes problems at your site.  If it is not convienent for you to make
the "postgres" user userid 6, complete the below instructions on
.b Loading
\*(PG,
but read the 
.b Release
.b Notes
notes on how to get around this problem
.b before
continuing on to the
.b Configuration
section.
.pp
.\" ----------------
.tm    Loading
.\" ----------------
.sh 2 "Step 2 - Loading \*(PG"
.pp
After completing step 1 (Preparation),
you should be ready to load
the \*(PG files onto your system.
To do this,
you will need either
a distribution tape or a \*(PG tar file.
.pp
If you are loading \*(PG from a tape, follow these instructions;
if you are loading from a tar file obtained via FTP, skip to the
section "Loading \*(PG from a Tar File".
.sh 3 "Loading \*(PG from a Tape"
.pp
Login as postgres.
.pp
3.  Run "tar" with the "extract, verbose, file" options:
.pp
% tar xvf <tape-device>
.sp
where <tape-device> is the name for your tape device, i.e.,
/dev/rmt0, /dev/rst8, etc.
.pp
The file "postgres-v4r0r1.tar.Z" will appear in your \*(PG home directory.
You may need to re-wind your tape to get it out of your tape
drive - see your system administrator for instructions.
.pp
Please proceed to the section "Loading \*(PG from a Tar File".
.pp
.sh 2 "Loading \*(PG from a Tar File"
.pp
If you are not logged in as \*(PG already, log in as \*(PG.
Make sure your current working directory is the \*(PG home
directory, and that the \*(PG tar file is there.
For the purpose of this discussion, the \*(PG tar file will be called
.pp
postgres-v4r0r1.tar.Z
.pp
Uncompress the tar file.
.pp
% uncompress postgres-v4r0r1.tar.Z
.pp
A larger file should now be in the \*(PG home directory, and the '.Z'
ending should be gone, so it is now named
.pp
postgres-v4r0r1.tar
.pp
Extract \*(PG from the tar file, using the "extract, verbose, file"
options:
.pp
% tar xvf postgres-v4r0r1.tar
.pp
Lots of file names and such should appear on the screen.
This step may take several minutes.
.pp
Now do an "ls":
.pp
The output of the ls should look something like:
.(l
COPYRIGHT	bench/	demo/	newconf/	src/
README	doc/	ref/	test/	sample/	video/
.)l
.pp
At this point you have loaded the \*(PG files.
Other directories will be created by the installation process.
.sp
.\" ----------------
.tm    Configuration
.\" ----------------
.sh 2 "Step 3 - Configuration"
.pp
This step requires familiarity with configuring a UNIX kernel.
If you are unfamiliar with this procedure,
we advise you to read the
section on configuring a kernel in the SunOS or DEC system administration
manual carefully.
This task requires superuser authority and should
probably not be done without the assistance of your system administrator.
We assume that whoever undergoes this procedure has an understanding
of the process and procedures involved.
.pp
\*(PG uses shared memory segments which must be compiled into the
kernel of the host which will act as the \*(PG server.
If you try to run a postgres backend process on a machine without enough
shared memory, the backend will abort with an error message.
.pp
This is by far the most complicated part of the installation
so these steps should be performed by someone with system administration
experience.  Again, we advise you to consult
the system administration section of your manual
before doing this step.
.pp
For a brief discussion of shared memory,
you may want to consult the Man pages for \fIshmget()\fR,
\fIshmop()\fR, \fIshmctl()\fR, etc.  Now proceed to the appropriate
section for your machine.
.pp
.sh 3 "Kernel reconfiguration for Suns and Sparcs"
.pp
In order to reconfigure Sun or Sparc kernel, you will have to become root
and add some lines to /usr/sys/conf (your kernel config file)
and /usr/sys/conf/param.c (your kernel parameters file).
We
.i strongly
advise you to make a spare copy of your system's original config
and parameter files before you make any changes.
.lp
The following lines should be added to /usr/sys/conf/KERNEL:
.sp
.(l
options		IPCMESSAGE		# SystemV IPC Message Facility 
options		IPCSEMAPHORE	# SystemV IPC Semaphore Facility
options		IPCSHMEM		# SystemV IPC Shared-Memory Facility
options		EMOREIPCS	# more semaphores and shared memory (for 8M)
.)l
.sp
.lp
At Berkeley, we substitute the line: 
.(l 
options		EMOREIPCS	# more semaphores and shared memory (for 8M)
.)l
.lp
with the line:
.(l
options		TTMOREIPCS	# more semaphores and shared memory (for 32M)
.)l
.lp
to allocate more shared memory so that we can run more \*(PG backends
at the same time.  Either of the lines will result in a kernel that
has enough shared memory allocated.
.lp
Also add the following lines to the \fItop\fR of /usr/sys/conf/param.c:
.sp
.(l
/*
 * LOCAL DEFINITIONS START
 */

#ifdef	EMORESEMS
#define EMOREIPCS
#endif	/* defined(EMORESEMS) */

#ifdef	TTMORESEMS
#define TTMOREIPCS
#endif	/* defined(TTMORESEMS) */

#ifdef	EMOREIPCS
#define SEMMNI		30	/* # of semaphore identifiers */
#define SEMMNS		180	/* # of semaphores in system */
#define SEMUME		10	/* max # of undo entries per process */
#define SEMMNU		30	/* # of undo structures in system */

#define SHMPOOL 	1536		/* max total shared memory system wide (in Kbytes) */
#define SHMSEG		6	/* max attached shared memory segments per process */
#define SHMMNI		100	/* # of shared memory identifiers */
#endif	/* defined(EMOREIPCS) */

#ifdef	TTMOREIPCS
#define SEMMNI		60	/* # of semaphore identifiers */
#define SEMMNS		384	/* # of semaphores in system */
#define SEMUME		10	/* max # of undo entries per process */
#define SEMMNU		30	/* # of undo structures in system */

#define SHMPOOL 	8192		/* max total shared memory system wide (in Kbytes) */
#define SHMSEG		6	/* max attached shared memory segments per process */
#define SHMMNI		100	/* # of shared memory identifiers */
#endif				/* defined(TTMOREIPCS) */

/*
 * LOCAL DEFINITIONS END
 */
.)l
.pp
After adding these lines,
run config over the config file,
install the new kernel,
and reboot.
.sp
.sh 3 "Kernel reconfiguration for DECs"
.pp
In order to reconfigure your DECstation 3100 or 5000 Ultrix kernel,
you will have to become root and add some lines to /usr/sys/conf
(your kernel config file).
.sp
The following lines should be added to /usr/sys/conf/KERNEL:
.sp
.(l
smmax           256
smseg           12
smbrk           1024
.)l
.pp
After adding these lines, run 
.i config
over the configuration file,
install the new kernel, and reboot.
.sp
.\" ----------------
.tm    Compiling
.\" ----------------
.sh 2 "Configuring \*(PG"
.pp
This release of \*(PG
may require some configuration.
For performance reasons, Postgres is by default compiled with the optimizer
enabled and internal debugging assertions disabled.  If you plan to modify
Postgres, you may want to enable debugging (note that this will take Postgres
up to about 50 megs from about 45 megs otherwise), and enable internal
debugging assertions.
.pp
To enable compiler directives, 
read the file ./newconf/CONFIG/README
for instructions on what to change.
Now to edit the configuration file,
.(l
.sp 0.5v
% \fBcd /usr/postgres/newconf/CONFIG\fP
.sp 0.5v
% \fBvi config.mk.<port>\fP
.)l
.pp
where
.i <port> is the following:
.(l
dec	\- DS3100 running Ultrix LOWER than 4.0
ultrix4	\- DS3100, 5000, 5500, etc. running Ultrix 4.0 or higher
sun	\- Sun 3 running SunOS 3.4 or 3.5
sunos4	\- Sun 3 running SunOS 4.0 or higher
sparc	\- Sparcstation or Sun 4
.)l
The
.i only
thing we recommend changing is the
GCFLAGS variable.  Remember the
.b port
.b name
used here as it is necessary for Step 4.
.pp
.sh 2 "Step 4 - Compiling and Installing \*(PG"
Now you are ready to install Postgres.  To do so,
simply execute the following commands:
.(l
% \fBcd ~postgres/newconf\fR
% \fBsetenv POSTGRESHOME ~postgres\fR
% \fB./Make install\fR
.)l
.pp
.lp
.i Make
.i install
will ask you for the port you wish to use.  Use the port name that you
used in 
.b Configuring
\*(PG.
You will also be asked for the name of the object tree directory;
the default is ~postgres/obj.<port>.  (throughout the rest of this document
obj.<port> refers to the object tree directory).  This step will take from
about 40 minutes on Sparc II or DEC 5000 class machines to several hours
on Sun 3's.
The POSTGRESHOME environment variable is the home directory of the Postgres
user.  In the course of the installation process, the Postgres
.b bin
and 
.b data
directories will be created and populated.
.pp
.i Make
is a C shell script that runs
.i make
with Makefiles that are constructed on the fly.
If you have problems at this point,
it is possible that your
.i \&.cshrc
file does strange things \*-
changes directories,
sets or unsets environment variables,
and so on.
.pp
You should see no errors during this phase, except possibly for warnings
(which can be ignored) when compiling the output of
.i yacc
and
.i lex.
.sh 3 "Creating the initial database"
.pp
\*(PG databases are stored in the directory ~postgres/data.
After you have compiled \*(PG,
you will need to create the
initial database.
To do this,
type 
.(l
% \fBsetenv POSTGRESHOME ~postgres\fR
% \fB~postgres/bin/postmaster &\fR
% \fB~postgres/bin/createdb postgres\fR
% \fBkill %~postgres/bin/postmaster\fR
.)l
This will create the bootstrap template database, from which
the database 
.q postgres
will be generated.  The
.i postmaster
program will be discussed later - however, you must have it running in order
to run 
.i createdb.
If several users wish to use \*(PG,
we advise you to create additional databases,
one for each user.
This can be done by running
.i createdb
with the username as the first argument.
For example,
to create a database for the user \*(lqbill\*(rq,
type
.(l
% \fB~postgres/bin/createdb bill\fR
.)l
.\" ----------------
.tm    Testing
.\" ----------------
.sh 2 "Step 4 - Testing"
.sh 3 "Testing \*(PG"
.pp
After compiling the \*(PG backend and support programs and
creating the initial database,
you should test your compilation
with the following.
Commands you should type appear in \fBboldface\fP.
.(l
\fB% ~postgres/bin/postgres\fR
.ft CW
	---debug info---
	Quiet =        f
	Noversion =    f
	override  =    f
	DatabaseName = [postgres]
	----------------

	**** Transaction System Active ****
	InitPostgres()..

POSTGRES backend interactive interface
$Revision: 1.24 $ $Date: 1992/07/20 18:33:04 $
	StartTransactionCommand() at Thu Nov  2 15:43:35 1989
.ft
> \fBretrieve (pg_user.all)\fP
.ft CW
 now in make_Var
relation = pg_user, attr = usecatupd
vnum = 1
	...
.ft
	\fIlots of debugging output...\fP
.ft CW

---- 	parser outputs :
((1 retrieve nil (("pg_user" 86 0 nil nil ))0 nil )((#S(resdom :resno 1
:restype 19 :reslen 16 :resname "usename" :reskey 0 :reskeyop 0)#S(var
	...
.ft
	\fIlots more debugging output...\fP

.ft CW
	ProcessQuery() at Thu Nov  2 15:43:50 1989

blank
	 1: usename	(typeid = 19, len = 16, byval = f)
	 2: usesysid	(typeid = 21, len = 2, byval = t)
	 3: usecreatedb	(typeid = 16, len = 1, byval = t)
	 4: usetrace	(typeid = 16, len = 1, byval = t)
	 5: usesuper	(typeid = 16, len = 1, byval = t)
	 6: usecatupd	(typeid = 16, len = 1, byval = t)
	----
	 1: usename = "postgres"	(typeid = 19, len = 16, byval = f)
	 2: usesysid = "6"	(typeid = 21, len = 2, byval = t)
	 3: usecreatedb = "t"	(typeid = 16, len = 1, byval = t)
	 4: usetrace = "t"	(typeid = 16, len = 1, byval = t)
	 5: usesuper = "t"	(typeid = 16, len = 1, byval = t)
	 6: usecatupd = "t"	(typeid = 16, len = 1, byval = t)
	----
	 1: usename = "goh"	(typeid = 19, len = 16, byval = f)
	 2: usesysid = "234"	(typeid = 21, len = 2, byval = t)
	 3: usecreatedb = "t"	(typeid = 16, len = 1, byval = t)
	 4: usetrace = "t"	(typeid = 16, len = 1, byval = t)
	 5: usesuper = "t"	(typeid = 16, len = 1, byval = t)
	 6: usecatupd = "t"	(typeid = 16, len = 1, byval = t)
	----
	 ...

	CommitTransactionCommand() at Thu Nov  2 15:43:51 1989

	StartTransactionCommand() at Thu Nov  2 15:43:51 1989
.ft
	\fIIt works!\fP

\fI
	The above response is an example of the raw output
	generated by the backend.  Your actual output may be slightly
	different.  Normally, you would use a
	terminal monitor to talk to the backend instead.
	To leave the backend, type <ctrl-D>:
\fR
> ^D
%
.)l
.sp
.\" ----------------
.tm    Running
.\" ----------------
.sh 1 "Running \*(PG"
.pp
\*(PG is designed to be a multiuser system.
In practice,
\*(PG consists of three (or more) processes:
.ip \0\0\0\(bu
the postmaster,
.ip \0\0\0\(bu
the terminal monitor,
and
.ip \0\0\0\(bu
the backend.
.lp
Users are expected to use the terminal monitor.
The terminal monitor
sends commands to the postmaster which forwards commands to a backend.
If you just completed step 3,
then you have already been introduced to the \*(PG backend,
so we'll talk about the other two processes now.
.sh 2 "The \*(PG Postmaster"
.pp
The postmaster is a process which manages communication between the
user's terminal monitor and a \*(PG backend.
Without a running postmaster,
the terminal monitor will not be able to connect to a backend.
To start the postmaster, type:
.(l
% \fBcd ~postgres/bin\fR
% \fBsetenv POSTGRESHOME ~postgres\fR
% \fBpostmaster &\fR
.)l
Here we are using the default parameters for the postmaster.  For more
details, consult the Reference.
.sh 2 "The \*(PG Terminal Monitor"
.pp
The \*(PG terminal monitor is a front-end user interface to the
\*(PG backend.
To start a terminal monitor,
type
.(l
% \fBmonitor <database>\fR
.)l
.pp
\fIDatabase\fR is the name of the database you want to use. 
Now we will run the monitor:
.(l
.ft CW
Welcome to the C POSTGRES terminal monitor

Go 
*
.ft

\fI
The ``*'' is the terminal monitor prompt.  We are now
talking to the backend, so let's send a simple test
query:  list the names and user ids of the postgres users.
We terminate the query with a \eg \*- the ``go'' command
to the terminal monitor.
\fR

*\fBretrieve (u.usename, u.usesysid) from u in pg_user
\eg\fP

.ft CW
Query sent to backend is "retrieve (u.usename, u.usesysid) from u in pg_user"
 -----------------------------
 | usename     | usesysid    |
 -----------------------------
 | postgres    | 6           |
 -----------------------------
 | mike        | 799         |
 -----------------------------
 | sp          | 1511        |
 -----------------------------
 | jhingran    | 943         |
 -----------------------------
 | cimarron    | 2359        |
 -----------------------------
 | goh         | 1994        |
 -----------------------------
 | ong         | 2802        |
 -----------------------------
 | hong        | 2469        |
 -----------------------------
 | mao         | 1806        |
 -----------------------------
 | margo       | 2697        |
 -----------------------------
 | sullivan    | 1517        |
 -----------------------------
 | kemnitz     | 3491        |
 -----------------------------
 | choi        | 3898        |
 -----------------------------
 | mer         | 3665        |
 -----------------------------

Go 
.ft
.ft I
.pp
	Okay, this worked, too.  Now we'll quit.
.pp
*\fB\eq\fP
.ft CW
I live to serve you.
.ft
%
.)l
.sh 2 "The \*(PG Backend"
.pp
The \*(PG backend is the process which does all the \*(lqreal\*(rq
work.
This process is started by the postmaster when the postmaster
receives a connection from a terminal monitor,
so you should not normally need to start up the backend yourself.
Should you wish to
start the backend and talk to it directly (without a terminal monitor)
you can do this by typing:
.(l
% \fB~postgres/bin/postgres\fR \fIdatabase\fR
.)l
.lp
where \fIdatabase\fR is the name of the database you wish to use.
If you run a backend in this manner,
you will be talking to the backend parser directly.
We recommend using the terminal monitor; if you are using Postgres as a
multiuser system, running the backend can result in locking failures
and corrupt databases, as the Postmaster handles shared resources such
as semaphores and shared memory.
In addition, returned tuples are displayed more usefully
and input is buffered better.  
The backend is used interactively primarily during debugging.
.sh 2 "\*(PG Support Programs"
.pp
Included in \*(PG are a handful of support programs.
Most of these are used internally by the system but here is a list of
them for your information.
.(l
initdb		\- creates the initial template database
createdb		\- creates new postgres databases
createdb.sh	\- creates new postgres databases - old version
destroydb	\- destroys postgres databases
ipcclean		\- frees up garbage shared memory from failed backends
pg_version	\- make version numbers for createdb
pg_id		\- gets user id's for createdb
pg_uid		\- gets postgres user id for initializing the template database
pagedoc		\- disk page doctor
shmemdoc		\- shared memory buffer pool doctor
.)l
.sh 1 "Optional Installation"
.sh 2 "Installing LIBPQ, the \*(PG frontend library"
.pp
The file ~postgres/obj.<port>/libpq.a is created when you
compile the system.
This library contains various 
routines intended for use by frontend programs.
You use this library if you want to execute Postgres queries
from a C program.  If you plan on doing software development,
you may wish to copy this file to
/usr/lib so that the C compiler can reference it with -lpq.
To do this,
type:
.(l
# \fBcp ~postgres/obj.<port>/libpq.a   /usr/lib\fR
.)l
.sh 2 "Demo Database"
.pp
In ~postgres/demo are files to be included by the terminal monitor
to set up a demo database.
Additional files demonstrate inheritance,
historical queries,
abstract data types,
and various other features
of \*(PG.
A description of the demo database can be found
in ~postgres/demo/DEMO-README.
.sh 2 "Video Demo Database"
.pp
In ~postgres/video are files that were used in the 1991 Postgres SIGMOD
video.  These files demonstrate both the instance level and query rewrite
rule systems, views, versions, and spatial queries using R-Tree indices.
A description of the video database can be found in
~postgres/video/VIDEO-README.
.sh 2 "Wisconsin Benchmark Database"
.pp
In ~postgres/bench are files which are the queries used in the Postgres
version of the Wisconsin benchmark.  The Wisconsin benchmark illustrates
"basic" relational performance using B-Tree indices on nontrivial amounts
of data.  Instructions for running the benchmark are in
~postgres/bench/WISC-README.
.pp
.sh 2 "Minimal Installation"
.pp
The directories (in ~postgres) necessary
for a minimal running system are:
.(l
bin/		the binary programs comprising \*(PG
data/		support files and user created databases
files/		database initialization scripts
.)l
When compiled using the "default" compilation options as shipped, (ie
optimization and no debugging), these directories will take up about 5 Mbytes.
The following directories are necessary if Postgres is to ever be recompiled.
.(l
newconf/	the \*(PG configuration directory
obj.<port>/	compiled \*(PG object files
src/		\*(PG source files
.)l
.pp
When compiled using the "defaults", these directories will use about 16
Mbytes.
Additional Postgres directories are as follows:
.(l
demo/		demo database scripts
video/		video demo database scripts
bench/		Wisconsin benchmark database scripts
sample/		Sample LIBPQ application
doc/		postgres technical reports and the \*(PG Manual
ref/		\*(PG Reference source
.)l
.pp
These directories take up about 2 Mbytes, and can be reduced to about
200 Kbytes if the Postscript files in doc and ref are deleted. 
.pp
We do not recommend deleting these unless absolutely necessary.
.\" ----------------
.tm    Documentation
.\" ----------------
.sh 1 "Documentation"
.sh 2 "Printing the Manual"
.pp
The \*(PG manual is now in the file
.(l
\fB~postgres/doc/manual.me\fR
.)l
This manual replaces the old tutorials, which are no longer distributed.  It
is recommended that you read this manual before making extensive use of 
\*(PG.  A Postscript version of this manual is in
.(l
\fB~postgres/doc/psdump/manual.ps\fR
.)l
.pp
.sh 2 "Printing the Reference"
.pp
The Reference is the document which details the exact syntax used by
\*(PG commands, and provides interface definitions for LIBPQ and large
objects.  It is intended as a reference and should not be read cover to
cover.
.pp
If you have a Postscript printer, you can print the Reference by
changing directory to the 
.(l
\fB~postgres/ref\fR
.)l
directory, where you will find a Postscript file called \fBref.t\fR.
This file can be simply sent to the printer in whatever fashion your site
uses to print Postscript files.
.pp
If you do not have a Postscript printer, or you have font problems, etc.,
the \fBref\fR directory contains a /bin/sh script called "genref".  Edit
this script and set the appropriate parameters for printing at your site
in this script, and then execute it by typing
.(l
% \fBgenref\fR
.)l
This script will not actually try to send the job to the printer - rather
it will create the \fBref.t\fR output file.  You can then print the
manual by sending this file directly to the printer with the regular printing
commands used by your site.
.pp
If \fBgenref\fR fails, you may not have the \fBgrn\fR preprocessor.  This
preprocessor for troff allows pictures drawn with the \fBgremlin\fR graphics
editor to be printed using a "troff" command.  A script called \fBeatgrn\fR is
provided, which will cause \fBgenref\fR to ignore \fBgrn\fR directives and
print anyway - this will result in the reference being printed without
illustrations.  There is only one illustration, so this should not be too
much of a problem.
.pp
.sh 3 "If you do not have a Postscript printer"
.pp
If you do not have a Postscript printer, change the \fBpsroff\fR command in
the \fBgenref\fR script to the
text formatting command you use at your site, typically \fBnroff\fR,
\fBtroff\fR, or \fBditroff\fR.
As stated above, use the \fBeatgrn\fR script if you do not have \fBgrn\fR.
Output suitable
for a line-printer can be created using \fBnroff\fR.  
.pp
.sh 2 "Printing the Technical Reports and Tutorials"
.pp
Postscript versions of the Postgres technical reports, tutorials, and
release notes are in the directory \fB~postgres/doc/psdump\fR.  Some files
are not
included in Postscript form and are simply regular files - read the file
\fB~postgres/doc/README\fR for details.
.pp
The /bin/sh script
\fB~postgres/doc/print\fR
contains site-specific printing parameters, and understands the file extension
protocol used
in the \fBdoc\fR directory.  Once you set the site-specific parameters for
printing in this script, you should be able to print all the files in the
\fBdoc\fR easily, by executing
.(l
% \fBprint <filename>\fR
.)l
from the \fB~postgres/doc\fR directory.
.pp
Unlike the \fBgenref\fR script described above, this
script will send the job directly to the printer.  If you do not have the
\fBgrn\fR utility described above, you should use the \fBeatgrn\fR script here
as well.  For technical reports which require \fBmake\fR, continue to
the following section.
.pp
.sh 3 "If the directory has a makefile"
.pp
A couple of the technical reports use makefiles to generate their printable
versions rather than the \fBprint\fR script.  If the subdirectory has
a makefile, you will have
to change the site-specific parameters in the
makefile, run 
.(l
% \fBmake\fR
.)l
and then it will either print or create a printable file.  Note that if the
makefile uses \fBgrn\fR and you do not have access to this utility, you can
use the \fBeatgrn\fR script here as well.
.sh 2 "The 4.0.1 Release Notes"
.pp
The Postgres 4.0.1 Release Notes are in the file
\fB~postgres/doc/release4.0.1.me\fR.
Before working extensively with Postgres, you should read this file to
find new features, known bugs, and other useful information about this
release.
.pp
As described above, you can print this file by typing
.pp
.(l
% \fBprint ~postgres/doc/release4.0.1.me\fR
.)l
.\" ----------------
.tm    Miscellaneous
.\" ----------------
.sh 1 "Miscellaneous"
.sh 2 "Bug reports"
.pp
If you find a bug with \*(PG,
please send mail to
.(l
\0\0\0\0\0bug-postgres@@postgres.Berkeley.EDU
or
\0\0\0\0\0(ucbvax!postgres!bug-postgres)
.)l
describing as precisely as possible the command that caused
the problem,
instructions on how to repeat the bug,
and a script showing the bug. 
.sh 2 "Known Bugs List"
.pp
A Known Bugs List with suggested workarounds is maintained on the machine
\fBpostgres.berkeley.edu\fR in the file \fBpub/postgres-v4r0r1.bugs\fR.  The
Internet address of this machine is \fB128.32.149.1\fR, and if you cannot
access Postgres, this file can be sent to you via e-mail.
.sh 2 "Consulting"
.pp
This software is unsupported,
public domain software.
Although we are interested in feedback,
it is impossible for us to make any
commitment to support in a research environment. 
.pp
If you do want to talk directly to the Postgres
group, electronic mail is strongly preferred.
We can be reached via the Internet as
.(l
\0\0\0\0\0post_questions@@postgres.Berkeley.EDU
or
\0\0\0\0\0(ucbvax!postgres!post_questions)
.)l
We can also be reached at (415) 642-7520,
Monday through Friday,
between 1 and 4 PM Pacific Time.
.pp
.sh 2 "Postgres BBS"
A mailing list for Postgres announcements and discussion
is available for anyone who is interested.  If you wish
to subscribe to this mailing list, send mail to
.(l
\0\0\0\0\0postgres-request@@postgres.Berkeley.EDU
.)l
with "Add" as the subject.  Note that mail sent to this address is processed
.b electronically.
.pp
The mailing list itself is called 
.(l
\0\0\0\0\0postgres@@postgres.Berkeley.EDU
.)l
and all mail sent to this address will be 
will be routed to the mailing list membership.
@


1.24
log
@add missing .(l
@
text
@d21 1
a21 1
.\"	POSTGRES version 2 setup instructions
d47 1
a47 1
C-Only Release 3.1
d142 3
a144 7
Tested but unsupported ports for DECstation Ultrix lower than 4.0 and Sequent
Symmetry machines running Dynix are included.  These ports are unsupported for
the following reasons: the old Ultrix dynamic loader is quite buggy, and the
standard
.i make
on the
Sequent Symmetry cannot compile Postgres.  
a156 5
To compile the Sequent Symmetry port, you will have to obtain
a System V Release 3 compatible
.i make.
Consult your Sequent representative
for details.
d163 1
a163 1
These instructions assume you have a \*(PG Version 3
d203 1
a203 3
problems on DECstations either.  However, we have had a great deal
of difficulty on Sequent Symmetry machines, so we advise that you
obtain a Sun-compatible make for these platforms.
d363 1
a363 1
The file "postgres-v3r1.tar.Z" will appear in your \*(PG home directory.
d376 1
a376 1
postgres-v3r1.tar.Z
d380 1
a380 1
% uncompress postgres-v3r1.tar.Z
d385 1
a385 1
postgres-v3r1.tar
d390 1
a390 1
% tar xvf postgres-v3r1.tar
a536 17
.sh 3 "Kernel reconfiguration for Sequent Symmetry machines"
.pp
In order to reconfigure your kernel,
you will have to become root
and add some lines to /usr/sys/conf (your kernel config file)
.sp
The following line should be added to /sys/conf/KERNEL:
.sp
.(l
options         SVSEMA
.)l
.pp
After adding this line,
run config over the config file,
install the new kernel,
and reboot.
.sp
a567 1
seq	\- Sequent Symmetry running Dynix
d682 1
a682 1
$Revision: 1.23 $ $Date: 1991/12/02 10:16:38 $
d896 3
d1078 1
a1078 1
.sh 2 "The 3.1 Release Notes"
d1080 2
a1081 2
The Postgres 3.1 Release Notes are in the file
\fB~postgres/doc/release3.1.me\fR.
d1089 1
a1089 1
% \fBprint ~postgres/doc/release3.1.me\fR
d1111 1
a1111 1
\fBpostgres.berkeley.edu\fR in the file \fBpub/postgres-v3r1.bugs\fR.  The
@


1.23
log
@3.0 -> 3.1
@
text
@d711 1
a711 1
$Revision: 1.22 $ $Date: 91/12/02 04:15:58 $
d823 1
@


1.22
log
@*** empty log message ***
@
text
@d47 1
a47 1
C-Only Release 3.0
d374 1
a374 1
The file "postgres-v3r0.tar.Z" will appear in your \*(PG home directory.
d387 1
a387 1
postgres-v3r0.tar.Z
d391 1
a391 1
% uncompress postgres-v3r0.tar.Z
d396 1
a396 1
postgres-v3r0.tar
d401 1
a401 1
% tar xvf postgres-v3r0.tar
d711 1
a711 1
$Revision: 1.21 $ $Date: 91/08/18 07:51:47 $
d1103 1
a1103 1
.sh 2 "The 3.0 Release Notes"
d1105 2
a1106 2
The Postgres 3.0 Release Notes are in the file
\fB~postgres/doc/release3.0.me\fR.
d1114 1
a1114 1
% \fBprint ~postgres/doc/release3.0.me\fR
d1136 1
a1136 1
\fBpostgres.berkeley.edu\fR in the file \fBpub/postgres-v3r0.bugs\fR.  The
@


1.21
log
@fixed a couple of problems.
@
text
@d97 1
a97 1
	Printing the Reference Manual
d711 1
a711 1
$Revision: 1.20 $ $Date: 91/08/18 05:41:18 $
d810 1
a810 1
details, consult the Reference Manual.
d993 2
a994 2
doc/		postgres technical reports and tutorials
ref/		\*(PG Reference Manual source
d1005 1
a1005 1
.sh 2 "Printing the Reference Manual"
d1007 19
a1025 1
If you have a Postscript printer, you can print the reference manual by
d1050 1
a1050 1
print anyway - this will result in the reference manual being printed without
@


1.20
log
@fixed confusing detail.
@
text
@d711 1
a711 1
$Revision: 1.19 $ $Date: 91/08/18 05:12:25 $
a910 2
Note that the program called "backend" is not really the backend; it is
a program used by createdb to initialize databases.
a916 1
backend		\- used by initdb to create system classes
d919 1
a919 1
createdb.sh		\- creates new postgres databases - old version
d953 1
d960 1
@


1.19
log
@fixed bogus wording on release notes
@
text
@d602 4
a605 1
GCFLAGS variable.  Remember the port name used here for Step 3.
d607 1
a607 1
.sh 2 "Step 3 - Compiling and Installing \*(PG"
d619 5
a623 2
will ask you for the port you wish to use.  Use the same port as
in Step 2.  You will also be asked for the name of the object tree directory;
d711 1
a711 1
$Revision: 1.18 $ $Date: 91/08/18 03:39:50 $
@


1.18
log
@added blurb on bad userid
@
text
@d330 5
a334 1
See the release notes for instructions on how to get around this problem
d339 4
a342 1
but read the installation notes on how to get around this problem
d705 1
a705 1
$Revision: 1.17 $ $Date: 91/08/18 02:38:57 $
@


1.17
log
@oops - changed name from postscript to psdump
@
text
@d325 16
d698 1
a698 1
$Revision: 1.16 $ $Date: 91/08/18 02:31:52 $
@


1.16
log
@cleaned up discussions about installation, docs, etc.
@
text
@d682 1
a682 1
$Revision: 1.15 $ $Date: 91/08/16 04:21:21 $
d1020 3
a1022 2
Postscript versions of the Postgres technical reports and tutorials are 
in the directory \fB~postgres/doc/postscript\fR.  Some files are not
@


1.15
log
@more updates for the 3.0 release.
@
text
@d96 5
d103 1
d368 1
a368 1
% uncompres postgres-v3r0.tar.Z
d682 1
a682 1
$Revision: 1.14 $ $Date: 91/03/09 05:00:09 $
d765 1
a765 1
If you just completed step 4,
d974 1
a974 1
.tm    Miscellaneous
d976 1
a976 1
.sh 1 "Miscellaneous"
d979 2
a980 1
You can print the Postgres reference manual by changing directory to the
d982 1
a982 1
\fBref\fR
d984 8
a991 3
directory.  There you will find a /bin/sh script called "genref".  Set all the
appropriate parameters for printing at your site in this script, and then
run it by typing
d996 3
a998 9
it will create an output file called "ref.t".  You can then print the
manual by sending this file directly to the printer with the "lpr" command.
The manual is about 80 pages of single-sided text.  If you do not have the
GRN preprocessor for troff, substitute the GRN command in the script
with the name "eatgrn", which is a script which is in the same directory, or
print the Postscript file "ref.t" which is provided in the "postscript"
subdirectory.  The "grn" program allows pictures drawn in the GREMLIN graphics
editor to be printed using a "troff" command, so if you use "eatgrn", the
illustrations in the manual will not be printed.
d1000 8
a1008 4
If you do not have a Postscript printer, change the "psroff" command to the
nroff command you use at your site, typically "nroff", "troff", or "ditroff".
As stated above, use the eatgrn script if you do not have GRN.  Output suitable
for a line-printer can be created using "nroff".  
d1010 8
d1019 13
a1031 2
You can print the Postgres technical reports and tutorials by changing
directory to the
a1032 6
\fBdoc\fR
.)l
subdirectory.  There you will find a /bin/sh script called "print".  After
you change the site-specific parameters in this script, you can print most
of these files, with the exception of those requiring "make", by typing
.(l
d1035 3
a1037 1
from this directory.  Unlike the "genref" script described above, this
d1039 4
a1042 3
"grn" utility described above, you should use the "eatgrn" script here
as well.  For technical reports which require "make", go to the following
section.
d1044 4
a1047 2
A couple of the technical reports use makefiles rather than the "print"
script.  If the subdirectory has a makefile, you will have
d1054 19
a1072 1
makefile uses GRN, you can use the eatgrn script here as well.
d1086 6
@


1.14
log
@changed a bit of stuff.
@
text
@d47 1
a47 1
C-Only Release 2.1
a90 1
    Periodic Maintenance
d145 1
a145 1
and you will require at least 30 megabytes of disk space
d166 1
a166 1
These instructions assume you have a \*(PG Version 2
d211 1
a211 1
\*(PG requires 30 megabytes of disk space,
d257 1
a257 1
at least 30 megabytes of free space available for \*(PG.
d345 1
a345 1
The file "postgres-v2r1.tar.Z" will appear in your \*(PG home directory.
d358 1
a358 1
postgres-v2r1.tar.Z
d362 1
a362 1
% uncompres postgres-v2r1.tar.Z
d367 1
a367 1
postgres-v2r1.tar
d372 1
a372 1
% tar xvf postgres-v2r1.tar
d381 2
a382 2
COPYRIGHT	demo/	newconf/	src/
README	doc/	ref/
d543 5
a547 5
For performance reasons, you may want to compile Postgres with the optimizer
enabled, floating point coprocessors enabled, etc.  The default is to use
the default options.  Also, if you plan to modify Postgres, you may want to
enable debugging (note that this will take Postgres up to about 50 megs from
about 30 megs otherwise).
a548 6
\fB
WARNING!!  DO NOT ENABLE COMPILER OPTIMIZATION ON SUN 4's OR SPARCS - POSTGRES
WILL CRASH YOUR MACHINE IF COMPILED THIS WAY!!  (This appears to be due to
a kernel problem with the shared memory functions.)
\fR
.pp
d550 1
a550 1
look in the file ./newconf/CONFIG/README
d564 1
a564 1
ultrix4	\- DS3100 running Ultrix 4.0
d566 1
a566 1
sunos4	\- Sun 3 running SunOS 4.0
d580 1
d590 9
a598 2
obj.<port> refers to the object tree directory).  This step will take at least
an hour and may take several hours on Sun 3's.
d626 4
a629 4
% \fBsetenv POSTGRESHOME ~postgres
% ~postgres/bin/postmaster &
% ~postgres/bin/createdb postgres\fR
% kill %~postgres/bin/postmaster
d676 1
a676 1
$Revision: 1.13 $ $Date: 91/03/07 03:45:05 $
d837 1
a837 1
 | plai        | 3665        |
a889 1
vacuumd	\- vacuum cleaner daemon
a892 9
.\" ----------------
.tm    Periodic Maintenance
.\" ----------------
.sh 2 "Periodic Maintenance"
.pp
The database log files in ~postgres/data/base/*/PG_DBLOG and 
~postgres/data/PG_SYSLOG can grow in size.
Periodic truncation of these files is recommended.
.pp
d912 1
a912 1
to setup a demo database.
d920 12
d942 2
a943 2
When compiled using the "defaults", (ie no optimization and no debugging),
these directories will take up about 8 Mbytes.
d956 3
d964 1
a964 1
200 Kbytes if the Postscript files are deleted. 
@


1.13
log
@Updates for 2.1
@
text
@d597 1
a597 1
an hour and may take several hours on diskless Sun 3's.
d635 3
a637 1
program will be discussed later.
d675 1
a675 1
$Revision: 1.12 $ $Date: 91/01/15 18:00:07 $
a799 5

NOTE: On DECstation 3100 Ultrix, there is a bug in fork() which causes the
monitor to hang on its first invocation.  To get around this problem, start the
monitor, type "\g <CR>" from the monitor prompt, wait a few seconds, kill the
monitor with <CRTL>C, and start it again.  It will work after this.
d883 2
a884 1
backend		\- used by createdb to create system relations
d886 1
@


1.12
log
@Version 2.03 Upgrade.
@
text
@d47 1
a47 1
C-Only Release 2.03
d346 1
a346 1
The file "postgres-v2r03.tar.Z" will appear in your \*(PG home directory.
d359 1
a359 1
postgres-v2r03.tar.Z
d363 1
a363 1
% uncompres postgres-v2r03.tar.Z
d368 1
a368 1
postgres-v2r03.tar
d373 1
a373 1
% tar xvf postgres-v2r03.tar
d626 1
d628 1
d633 3
a635 1
will be generated.
d673 1
a673 1
$Revision: 1.11 $ $Date: 90/11/01 17:00:14 $
@


1.11
log
@We don't  support Ultrix 4.0.
@
text
@d47 1
a47 1
C-Only Release 2.01
d136 5
a140 5
supported on DECstations running Ultrix LOWER than 4.0.  Unsupported
ports for DECstation Ultrix 4.0 and Sequent Symmetry machines running Dynix
are included.  These ports are unsupported for the following reasons: we are
having various problems porting to Ultrix 4.0 but Postgres mostly works (see
the release notes), and the standard
d346 1
a346 1
The file "postgres-v2r01.tar.Z" will appear in your \*(PG home directory.
d359 1
a359 1
postgres-v2r01.tar.Z
d363 1
a363 1
% uncompres postgres-v2r01.tar.Z
d368 1
a368 1
postgres-v2r01.tar
d373 1
a373 1
% tar xvf postgres-v2r01.tar
d503 1
a503 1
In order to reconfigure your DECstation 3100 Ultrix kernel,
d669 1
a669 1
$Revision: 1.10 $ $Date: 90/10/28 13:57:01 $
@


1.10
log
@Added disclaimer for DECstations.
@
text
@d134 7
a140 7
processors with SunOS 3.4, or 3.5, and 4.0, Sparc architecture machines
(Sparcstation and Sun 4) running SunOS 4.0 and higher, as well as Digital
Equipment Corporation DECstation 3100 computers running Ultrix 4.0.  An
unsupported port for DECstations running Ultrix lower than 4.0 is included,
as well as an unsupported port for Sequent Symmetry running Dynix.  These
ports are unsupported for the following reasons:  the dynamic loading mechanism
on Ultrix less than 4.0 is severely limited, and the standard
d143 1
a143 2
Sequent Symmetry cannot compile Postgres.  Other than these disclaimers, these
two ports work as well as the others.
d669 1
a669 1
$Revision: 1.9 $ $Date: 90/10/28 13:54:37 $
@


1.9
log
@*** empty log message ***
@
text
@d670 1
a670 1
$Revision: 1.8 $ $Date: 90/10/27 20:10:59 $
d795 5
a799 4
NOTE: On Ultrix, there is a bug in fork() which causes the monitor to hang
on its first invocation.  To get around this problem on DECstations, start the
monitor, type "\g <CR>" from the monitor prompt, wait a few seconds, and start
it again.  It will work after this.
@


1.8
log
@Yet more cosmetic changes.
@
text
@d670 1
a670 1
$Revision: 1.7 $ $Date: 90/10/27 19:57:35 $
d795 4
@


1.7
log
@Fixed some numbers
@
text
@d595 4
a598 3
in Step 2.  You will also be asked for the name of the object tree directory.
This step will take at least an hour and may take several hours on diskless
Sun 3's.
d670 1
a670 1
$Revision: 1.6 $ $Date: 90/10/27 19:52:29 $
a876 4
.\
.\ Keep the below indentation - this comes out correctly.
.\
.\
d898 1
a898 1
The file ~postgres/O/libpq.a is created when you
@


1.6
log
@More cosmetic changes.
@
text
@d669 1
a669 1
$Revision: 1.5 $ $Date: 90/10/27 19:48:23 $
d953 1
a953 1
These directories take up about 1 Mbyte, and can be reduced to about
@


1.5
log
@Made some cosmetic fixes.
@
text
@d592 2
a593 1
.i Make install
d669 1
a669 1
$Revision: 1.4 $ $Date: 90/10/27 18:52:01 $
a946 1
\*(PG distribution is extracted from tape:
@


1.4
log
@Lots of changes for Version 2.01
@
text
@d140 3
a142 1
on Ultrix less than 4.0 is severely limited, and the standard "make" on the
d158 3
a160 1
a System V Release 3 compatible "make".  Consult your Sequent representative
a240 2
.ip \0\0\0\(bu
Cleanup
a388 1
Proceed now to the Configuration section.
d506 1
a506 2
(your kernel config file) and /usr/sys/conf/param.c (your kernel
parameters file).
d551 1
d555 1
d571 6
a576 6
dec			\- DS3100 running Ultrix LOWER than 4.0
ultrix4		\- DS3100 running Ultrix 4.0
sun			\- Sun 3 running SunOS 3.4 or 3.5
sunos4		\- Sun 3 running SunOS 4.0
seq			\- Sequent Symmetry running Dynix
sparc		\- Sparcstation or Sun 4
d592 5
a596 4
Make install will ask you for the port you wish to use.  Use the same port as
in Step 2.  You will also be asked for the name of the object tree; go ahead
and use the default if there is no problem.  This step will take at least
an hour and may take several hours on diskless Sun 3's.
d611 4
a614 1
(which can be ignored) when compiling the output of YACC and LEX.
d634 3
a636 1
This can be done by running createdb with the username as the first argument.
d668 1
a668 1
$Revision: 1.3 $ $Date: 90/10/27 17:31:26 $
d787 7
a793 7
.ft I
	The ``*'' is the terminal monitor prompt.  We are now
	talking to the backend, so let's send a simple test
	query:  list the names and user ids of the postgres users.
	We terminate the query with a \eg \*- the ``go'' command
	to the terminal monitor.
.ft R
d835 1
d837 1
d840 1
a840 1
Bye 
d875 4
d881 1
a881 1
createdb	\- creates new postgres databases
d883 2
a884 2
ipcclean	\- frees up garbage shared memory from failed backends
vacuumd		\- vacuum cleaner daemon
d911 1
a911 1
# \fBcp ~postgres/O/libpq.a   /usr/lib\fR
d1041 5
a1045 3
.q "post_questions@@postgres.Berkeley.EDU"
and via UUCP as
.q "ucbvax!postgres!post_questions" .
d1054 5
a1058 2
.q postgres-request@@postgres.berkeley.edu
with "Add" as the subject.
d1061 3
a1063 1
.q postgres@@postgres.berkeley.edu
@


1.3
log
@Some other fixes
@
text
@d135 1
a135 1
(Sparcstation and Sun 4) running SunOS 4.1 and higher, as well as Digital
d137 6
a142 4
unsupported port for Ultrix 2.7 is included, and Postgres does run on
SunOS 4.0.X on Sparcs, but the dynamic loading feature needed for ADT's is
unsupported under this system configuration.  An unsupported port for Sequent
Symmetry running Dynix is also included.
d145 1
a145 1
and you will require at least 25 megabytes of disk space
d209 1
a209 1
\*(PG requires 25 megabytes of disk space,
d257 1
a257 1
at least 25 megabytes of free space available for \*(PG.
d332 1
a332 1
if you are loading from an FTP tar file, skip to the
d356 1
a356 1
the purpose of this discussion, the \*(PG tar file will be called
d374 1
a374 1
Large numbers of file names and such should appear on the screen.
a382 1

a393 2
.sh 3 "Kernel reconfiguration for Suns and Sparcs"
.pp
d406 2
a407 4
If you
try to run a postgres backend process on a machine without enough
shared memory,
the backend will abort with an error message.
d409 14
a422 2
In order to reconfigure your kernel,
you will have to become root
a424 17
A copy of the lines listed below can be found in the files
~postgres/misc/config.add and ~postgres/misc/param.add\**
.(f
\**
This document assumes that you are running under a BSD
environment using the C shell.
In the C shell ~postgres is
the home directory of the user \*(lqpostgres\*(rq.
If you are using the Bourne shell,
then substitute $HOME for occurrences of ~postgres
and
.q $
for the
.q %
shell prompt.
.)f
respectively.
d451 1
a451 2
at the same time.
Either of the lines will result in a kernel that
a499 10
This is by far the most complicated part of the installation
so these steps should be performed by someone experienced.
Again, 
we advise you to consult
the system administration section of your SunOS manual
before doing this step.
.pp
For a brief discussion of shared memory, 
you may want to consult the section 2 man pages for \fIshmget()\fR,
\fIshmop()\fR, \fIshmctl()\fR, etc. 
d503 4
a506 21
This step requires familiarity with configuring a UNIX kernel.
If you are unfamiliar with this procedure,
we advise you to read the
section on configuring a kernel in the DEC system administration
manual carefully.
This task requires superuser authority and should
probably not be done without the assistance of your system admistrator.
We assume that whoever undergoes this procedure has an understanding
of the process and procedures involved.
.pp
\*(PG uses shared memory segments which must be compiled into the
kernel of the host which will act as the \*(PG server.
If you
try to run a postgres backend process on a machine without enough
shared memory,
the backend will abort with an error message.
.pp
In order to reconfigure your kernel,
you will have to become root
and add some lines to /usr/sys/conf (your kernel config file)
and /usr/sys/conf/param.c (your kernel parameters file).
d516 4
a519 14
After adding these lines,
run config over the config file,
install the new kernel,
and reboot.
This is by far the most complicated part of the installation
so these steps should be performed by someone experienced.
Again, 
we advise you to consult
the system administration section of your DEC manual
before doing this step.
.pp
For a brief discussion of shared memory, 
you may want to consult the Man pages for \fIshmget()\fR,
\fIshmop()\fR, \fIshmctl()\fR, etc. 
d521 1
a521 1
.sh 3 "Kernel reconfiguration for Sequent Symmetrys"
a522 17
This step requires familiarity with configuring a UNIX kernel.
If you are unfamiliar with this procedure,
we advise you to read the
section on configuring a kernel in the DYNIX system administration
manual carefully.
This task requires superuser authority and should
probably not be done without the assistance of your system admistrator.
We assume that whoever undergoes this procedure has an understanding
of the process and procedures involved.
.pp
\*(PG uses shared memory segments which must be compiled into the
kernel of the host which will act as the \*(PG server.
If you
try to run a postgres backend process on a machine without enough
shared memory,
the backend will abort with an error message.
.pp
a536 10
This is by far the most complicated part of the installation
so these steps should be performed by someone experienced.
Again, 
we advise you to consult
the system administration section of your DYNIX manual
before doing this step.
.pp
For a brief discussion of shared memory,
you may want to consult the Man pages for \fIshmget()\fR,
\fIshmop()\fR, \fIshmctl()\fR, etc. 
d545 5
a549 11
If you did not unpack the source in /usr/postgres,
and you have not created a symbolic link from /usr/postgres to
the directory that
.i does
contain the code,
you will have to edit the configuration file.
Also,
if you have a floating-point coprocessor on your machine,
you should set the \-f68881 flag for the Sun C compiler.
This is not necessary,
but will substantially improve the performance of the system.
d551 8
a558 1
To do this,
a559 4
.i
	Change to the configuration directory in the directory
	that contains the unpacked system.
.r
d561 1
a561 1
% \fBcd newconf\fP
d563 2
a564 14
.i
	Now make the new port directories and create the config.mk appropriate
	for this machine.
.r
% \fBnewport\fP
When running 
.i newport
you will be asked which distribution you are installing.
For a DS3100 installation running Ultrix LOWER than 4.0, type "dec",
for a DS3100 installation on Ultrix 4.0 type "ultrix4", for a
Sun 3 installation running SunOS 3.4 or 3.5, type "sun",
for a Sun 3 installation running SunOS 4.0, 
type "sunos4", for a Sequent Symmetry installation type "seq",
for a Sparcstation type "sparc", and for a 
d566 9
a574 7
.sp 0.5v
.i
	Now make the necessary changed to config.mk.  The file newconf/README
	explains what the various entries in config.mk mean.
.r
.sp 0.5v
% \fBvi config.mk\fP
a575 4
.pp
Look in the README file,
and in config.mk,
for instructions on what to change.
d579 1
a579 1
GCFLAGS variable.
d581 3
a583 20
By default,
\*(PG will be compiled without the \-g flag
for source-level debugging.
The system is large,
and using \-g is very expensive.
If you intend to do debugging,
you should change GCFLAGS in config.mk to \-g.
We do not recommend doing this for casual users.
Without \-g,
the \*(PG tree consumes about 20 Mbytes of disk space.
With \-g,
the number doubles.  NOTE:  Do not compile Postgres with the optimizer level
higher than 0 on Sparcstations running SunOS 4.1; due to an kernel bug Postgres
compiled this way will CRASH YOUR SYSTEM.
.sh 2 "Step 3 - Compiling \*(PG"
.sh 3 "Compiling"
.pp
Once you have configured \*(PG,
you can perform a complete compilation with the following
sequence of commands:
d586 1
a586 1
% \fB./Make everything\fR
d590 4
a593 6
To install the code,
run
.(l
% \fB./Make install\fR
.)l
in the same directory.
d660 1
a660 1
$Revision: 1.2 $ $Date: 90/07/30 17:07:18 $
a898 20
.sh 2 "Performance Tuning"
.pp
Initial performance tuning can be achieved by tuning various
system parameters.
The file ~postgres/doc/bufmgr.doc
describes the parameters that can be used to change the buffer pool
size to tune buffer manager performance.
The parameter NDBUFS,
the number of buffers,
is in the file ~postgres/src/storage/buffer/internal.h.
Meanwhile,
the file ~postgres/src/lib/H/sinvaladt.h contains
parameters to tune the invalidation cache. 
The file plparm.h contains parameters to tune the lock manager.
The appropriate paramater to tune are NMAXSEM,
the maximum number of semaphores to be handled,
NMAXXIDHASH,
the maximum number of transactions that can be run in parallel,
and NMAXLTABLE,
the number of tables handled by the lock manager. 
d919 5
d925 1
a925 1
O/		compiled \*(PG object files
d929 3
a931 1
Several additional directories are also created as the
d939 2
a940 11
If space is limited on your system,
you can delete these additional directories.
Additionally,
if you do not wish to use \*(PG for development,
you can delete the following directories
\fIafter compiling and testing is done\fR:
.(l
O/		compiled \*(PG object files and libraries
src/		\*(PG source files
newconf/ 	make utilities
.)l
@


1.2
log
@various changes.
@
text
@d47 1
a47 1
C-Only Release 2.0
d134 7
a140 5
processors with SunOS 3.4 or 3.5, as well as Digital
Equipment Corporation DECstation 3100 computers running
Ultrix 2.0 Rev 7.  Ports for Sparcstation 1, SunOS 4.0 on
Sun 3's, and Sequent Symmetry minicomputers are also included in the
distribution.
d153 3
a155 2
A Sequent Symmetry port is available, except that you will have to obtain
a System V Release 3 compatible "make" in order to compile \*(PG.
d255 2
a256 2
at least 20 megabytes of free space available for \*(PG.
If you haven't any single partition with 20 megabytes free,
d343 1
a343 1
The file "postgres-v2r0.tar.Z" will appear in your \*(PG home directory.
d356 1
a356 1
postgres-v2r0.tar.Z
d360 1
a360 1
% uncompres postgres-v2r0.tar.Z
d365 1
a365 1
postgres-v2r0.tar
d370 1
a370 1
% tar xvf postgres-v2r0.tar
d647 3
a649 2
For a DEC installation, type "dec", for a Sun 3 installation running
SunOS 3.4 or 3.5, type "sun",
d651 2
a652 2
type "sunos4", for a Sequent Symmetry installation type "seq", and
for a Sparcstation type "sparc".
d682 3
a684 1
the number doubles.
d716 2
a717 1
You should see no errors during this phase.
d728 1
a728 1
% ~postgres/bin/createdb \-v off postgres\fR
d769 1
a769 1
$Revision: 1.1 $ $Date: 90/07/30 13:24:20 $
a868 1
number you use for \fIport\fR.
d876 1
a876 1
% \fB~postgres/bin/monitor database\fR
d962 2
a963 1
and corrupt databases.
d967 1
a967 1
Not that the program called "backend" is not really the backend; it is
d976 1
a976 1
createdb		\- creates new postgres databases
d978 4
a981 2
ipcclean		\- frees up garbage shared memory
vacuumd	\- vacuum cleaner daemon
@


1.1
log
@Initial revision
@
text
@d138 1
a138 2
distribution, although these have not been completely tested due to
inaccessability.
d637 15
a665 2
If you have a floating-point coprocessor,
use \-f68881.
d676 1
a676 1
the \*(PG tree consumes about 25 Mbytes of disk space.
a686 1
% \fB./newport (see below)\fR
a689 10
When running 
.i newport
you will be asked which distribution you are installing.
For a DEC installation, type "dec", for a Sun 3 installation running
SunOS 3.4 or 3.5, type "sun",
for a Sun 3 installation running SunOS 4.0, 
type "sunos4", for a Sequent Symmetry installation type "seq", and
for a Sparcstation type "sparc".
Also, use the default object directory name for the object
tree.
d720 1
a720 1
% \fsetenv POSTGRESHOME ~postgres
d762 1
a762 1
$Revision: 2.0 $ $Date: 90/07/12 15:15:50 $
d895 31
a925 31
-----------------------------
| usename     | usesysid    |
-----------------------------
| postgres    | 6           |
-----------------------------
| mike        | 799         |
-----------------------------
| sp          | 1511        |
-----------------------------
| jhingran    | 943         |
-----------------------------
| cimarron    | 2359        |
-----------------------------
| goh         | 1994        |
-----------------------------
| ong         | 2802        |
-----------------------------
| hong        | 2469        |
-----------------------------
| mao         | 1806        |
-----------------------------
| margo       | 2697        |
-----------------------------
| sullivan    | 1517        |
-----------------------------
| kemnitz     | 3491        |
-----------------------------
| choi        | 3898        |
-----------------------------
| plai        | 3665        |
-----------------------------
@
