cvsdist 6f2c3a9
README.rpm-dist
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 9636c11
Version 4.0, for the PostgreSQL 7.2-1PGDG RPMset.
cvsdist 6f2c3a9
Lamar Owen <lamar.owen@wgcr.org> 
cvsdist 9571e5d
----------------------------------------------------------------------------
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Contents:
cvsdist 9636c11
 0.)	Quick -i note.
cvsdist 6f2c3a9
 1.)	Introduction, QuickStart, and credits
cvsdist 6f2c3a9
 2.)	PostgreSQL RPM packages and rationale
cvsdist 6f2c3a9
 3.)	Upgrading from an older version of PostgreSQL without losing data.
cvsdist 6f2c3a9
 4.)	Regression Testing
cvsdist 6f2c3a9
 5.)	Starting postmaster automatically on startup
cvsdist 6f2c3a9
 6.)	Grand Unified Configuration(GUC) File.
cvsdist 6f2c3a9
 7.)	Rebuilding the source RPM.
cvsdist 6f2c3a9
 8.)	Contrib files.
cvsdist 6f2c3a9
 9.)	Logging set up
cvsdist 6f2c3a9
10.)	Further Information Resource
cvsdist 6f2c3a9
cvsdist 9636c11
QUICK '-i' NOTE
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
The postmaster '-i' option is NOT used by default in the initscript shipped
cvsdist 6f2c3a9
with these RPMs.  Please do NOT modify the initscript to add the '-i' back
cvsdist 6f2c3a9
in -- it will get overwritten on the next package upgrade.  Rather, see the
cvsdist 6f2c3a9
section below on the Grand Unified Configuration file, which includes the
cvsdist 6f2c3a9
recommended way to get '-i' functionality back.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
INTRODUCTION
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
This document exists to explain the layout of the RPM's for PostgreSQL, to 
cvsdist 6f2c3a9
explain how to migrate from an older version, and to explain WHY it can be
cvsdist 6f2c3a9
so difficult to upgrade PostgreSQL.
cvsdist 6f2c3a9
cvsdist 9636c11
This document is written to be applicable to version 7.2 of PostgreSQL, 
cvsdist 6f2c3a9
which is the current version of the RPM's as of this writing.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Official PostgreSQL Global Development Group RPM's will from version 7.1.2
cvsdist 6f2c3a9
on carry a 'PGDG' after the release number.  Other RPMset's as distributed
cvsdist 6f2c3a9
with Linux distributions may have a different release number and initials.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
It is preferable for the distribution-specific set to be the one used, as
cvsdist 6f2c3a9
the PGDG set is intentionally generic.  So, if your distro has a set of RPMs,
cvsdist 6f2c3a9
use them in preference.  If you want to stay up-to-date on the PostgreSQL
cvsdist 6f2c3a9
core itself, use the PGDG generic set -- but understand that it is a 
cvsdist 6f2c3a9
GENERIC set.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
These RPMs are designed to be LSB-compliant -- if you find this not to be the
cvsdist 6f2c3a9
case, please let me know by way of the pgsql-ports@postgresql.org mailing
cvsdist 6f2c3a9
list.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
QUICKSTART
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
If this is an upgrade, please go to section 3, UPGRADING.
cvsdist 6f2c3a9
If this is a fresh installation, simply start the postmaster using:
cvsdist 68d4798
 /etc/rc.d/init.d/postgresql start  (on RedHat and TurboLinux)
cvsdist 6f2c3a9
cvsdist 6f2c3a9
The file /var/lib/pgsql/.bash_profile is now packaged to help with the 
cvsdist 6f2c3a9
setting of environment variables. You may edit this file, and it won't be
cvsdist 6f2c3a9
overwritten during an upgrade.  However, enhancements and bugfixes may be added
cvsdist 6f2c3a9
to this file, so be sure to check .bash_profile.rpmnew after upgrading.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
The user 'postgres' is created during installation of the server subpackage.
cvsdist 6f2c3a9
This user by default is UID and GID 26. The user has the default shell set to
cvsdist 6f2c3a9
bash, and the home directory set to /var/lib/pgsql.  This user also has no
cvsdist 6f2c3a9
default password -- in order to be able to su to from a non-root account
cvsdist 6f2c3a9
or login as 'postgres' you will need to set a password using passwd.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
CREDITS
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
Thomas Lockhart
cvsdist 6f2c3a9
Uncle George
cvsdist 6f2c3a9
Ryan Kirkpatrick
cvsdist 68d4798
Trond Eivind Glomsrød
cvsdist 6f2c3a9
Mark Knox
cvsdist 6f2c3a9
Mike Mascari
cvsdist 6f2c3a9
Nicolas Huillard
cvsdist 6f2c3a9
Karl DeBisschop
cvsdist 6f2c3a9
Roger Luethi
cvsdist 68d4798
Jeff Johnson
cvsdist 6f2c3a9
Reinhard Max
cvsdist 9636c11
Peter Eisentraut
cvsdist 6f2c3a9
cvsdist 6f2c3a9
POSTGRESQL RPM PACKAGES AND RATIONALE.
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 68d4798
On RedHat Linux, prior to version 6.5, PostgreSQL was packaged in RPM form in
cvsdist 6f2c3a9
three (or four) packages:
cvsdist 6f2c3a9
cvsdist 6f2c3a9
postgresql:		The server and documentation
cvsdist 6f2c3a9
postgresql-clients:	The client libraries, the cli, and the tcl interface
cvsdist 6f2c3a9
postgresql-devel:	Development libraries (for the client-side)
cvsdist 6f2c3a9
postgresql-data:	A sample database -- not shipped with the 6.4 RPMS.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
However, it was decided that a different split would be more appropriate for
cvsdist 6f2c3a9
users.  The 7.0 splitup allows more flexibility in installation, as well as
cvsdist 6f2c3a9
making the new clients into their own packages.  The new packages are:
cvsdist 6f2c3a9
cvsdist 6f2c3a9
postgresql:		Some clients and libraries, and documentation
cvsdist 6f2c3a9
postgresql-server:	Server executables and data files
cvsdist 6f2c3a9
postgresql-devel:	Client-side development libraries
cvsdist 6f2c3a9
postgresql-tcl:		TCL/TK client libraries and the pgaccess client
cvsdist 6f2c3a9
postgresql-perl:	PERL client module
cvsdist 6f2c3a9
postgresql-python:	The PygreSQL client library
cvsdist 6f2c3a9
postgresql-odbc:	Linux ODBC client (not required to use ODBC from Win95)
cvsdist 6f2c3a9
postgresql-jdbc:	JAR of the JDBC client
cvsdist 6f2c3a9
postgresql-test:	The regression tests and associated files.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
For version 7.0.x, another package is being shipped, and one package has been
cvsdist 6f2c3a9
trimmed:
cvsdist 6f2c3a9
postgresql-tk:		Tk client and pgaccess.
cvsdist 6f2c3a9
postgresql-tcl:		Tcl client and PL ONLY.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
For version 7.1, more packages are being shipped:
cvsdist 6f2c3a9
postgresql-libs:	client shared libraries.
cvsdist 6f2c3a9
postgresql-docs:	extra documentation,such as the SGML doc sources.
cvsdist 6f2c3a9
postgresql-contrib:	The contrib source tree, as well as selected binaries.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
For SuSE Linux <= 7.0, the packages are named differently, but with the same
cvsdist 6f2c3a9
functionality.  Here is a mapping:
cvsdist 68d4798
SuSE:			RedHat:
cvsdist 6f2c3a9
-----			-----------------
cvsdist 6f2c3a9
postgres		postgresql
cvsdist 6f2c3a9
pg_serv			postgresql-server
cvsdist 6f2c3a9
pg_devel		postgresql-devel
cvsdist 6f2c3a9
pg_tcl			postgresql-tcl
cvsdist 6f2c3a9
pg_perl			postgresql-perl
cvsdist 6f2c3a9
pg_pyth			postgresql-python
cvsdist 6f2c3a9
pg_odbc			postgresql-odbc
cvsdist 6f2c3a9
pg_jdbc			postgresql-jdbc
cvsdist 6f2c3a9
pg_test			postgresql-test
cvsdist 6f2c3a9
cvsdist 6f2c3a9
There are other changes to the SuSE packages to make them conform to the
cvsdist 6f2c3a9
SuSE packaging standards.  SuSE Linux has been shipping their own packages.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
While the repackaging will initially cause some confusion, it makes it
cvsdist 68d4798
possible  to set up a RedHat linux machine to be only a client -- the server
cvsdist 68d4798
is no longer required.  The clients were split out -- after all, a person who
cvsdist 68d4798
needs the perl client may very well not need the tcl client, etc.  And, the
cvsdist 68d4798
regression tests were added to give some confidence of the suitability of
cvsdist 68d4798
PostgreSQL, as well as the stability of the server machine.  Additionally,
cvsdist 68d4798
the regression tests can be used to help find hardware errors.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
RPM FILE LOCATIONS.
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
In compliance with the Linux FHS, the PostgreSQL RPM's install files in a manner
cvsdist 6f2c3a9
not consistent with most of the PostgreSQL documentation.  According to the
cvsdist 6f2c3a9
standard PostgreSQL documentation, PostgreSQL is installed under the directory
cvsdist 6f2c3a9
/usr/local/pgsql, with executables, source, and data existing in various 
cvsdist 6f2c3a9
subdirectories.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Different distributions have different ideas of some of these file locations.
cvsdist 6f2c3a9
In particular, the documentation directory can be /usr/doc, /usr/doc/packages,
cvsdist 6f2c3a9
/usr/share/doc, /usr/share/doc/packages, or some other similar path.  The
cvsdist 68d4798
RedHat 7 locations are listed below. On SuSE <7.1, substitute 'postgres' for 
cvsdist 6f2c3a9
'postgresql' below, and 'pg_tk' for 'postgresql-tk' below.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
However, the RPM's install the files like this:
cvsdist 6f2c3a9
Executables:		/usr/bin
cvsdist 6f2c3a9
Libaries:		/usr/lib
cvsdist 6f2c3a9
Documentation:		/usr/share/doc/postgresql-x.y.z
cvsdist 6f2c3a9
Contrib:		/usr/share/doc/postgresql-x.y.z/contrib
cvsdist 6f2c3a9
Source:			not installed
cvsdist 6f2c3a9
Data:			/var/lib/pgsql/data
cvsdist 6f2c3a9
Backup area:		/var/lib/pgsql/backup
cvsdist 6f2c3a9
Templates:		/usr/share/pgsql
cvsdist 6f2c3a9
Procedural Languages:	/usr/lib/pgsql
cvsdist 6f2c3a9
TK client docs:		/usr/share/doc/postgresql-tk-x.y.z
cvsdist 6f2c3a9
Development Headers:	/usr/include/pgsql
cvsdist 6f2c3a9
Other shared data:	/usr/share/pgsql
cvsdist 6f2c3a9
Regression tests:	/usr/lib/pgsql/test/regress  (in the -test package)
cvsdist 6f2c3a9
Documentation SGML:	/usr/share/doc/postgresql-docs-x.y.z
cvsdist 6f2c3a9
cvsdist 68d4798
The above list references the Red Hat 7.x structure.  These locations may 
cvsdist 6f2c3a9
change for other distributions.  Use of 'rpm -ql' for each package is
cvsdist 6f2c3a9
recommended as the 'Official' location source.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
While it may seem gratuitous to place these files in different locations, the
cvsdist 6f2c3a9
FHS requires it -- distributions should not ever touch /usr/local.  It may
cvsdist 6f2c3a9
also seem like more work to keep track of where everything is -- but, that's
cvsdist 6f2c3a9
the beauty of RPM -- you don't have to keep track of the files, RPM does it
cvsdist 6f2c3a9
for you.
cvsdist 6f2c3a9
cvsdist 9636c11
These RPM's are meant to be LSB-compliant.  If you find errors in them that
cvsdist 9636c11
cause thembe be non-compliant, please let me know.
cvsdist 9636c11
cvsdist 6f2c3a9
UPGRADING.
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9
CAUTION: While a semi-automatic upgrade process has been implemented, it is
cvsdist 6f2c3a9
STRONGLY recommended that a full dump of your database (using pg_dumpall) is
cvsdist 6f2c3a9
performed BEFORE upgrading the RPMs!  If you have already done the upgrade
cvsdist 6f2c3a9
with the RPM, and want to return to your previous version to do the dump,
cvsdist 6f2c3a9
find the old RPM's and use 'rpm -U --oldpackage' to downgrade.
cvsdist 6f2c3a9
cvsdist 9636c11
I cannot overemphasize this precaution.
cvsdist 9636c11
cvsdist 6f2c3a9
NOTE: moving your existing data from /var/lib/pgsql to /var/lib/pgsql/data is
cvsdist 6f2c3a9
not currently automatic -- you will need to do this yourself at this release!
cvsdist 9636c11
This change occurred between 6.5.3 and 7.0, so upgrading from prior to 7.0 to
cvsdist 9636c11
7.0 or later might be difficult.  
cvsdist 6f2c3a9
cvsdist 9571e5d
NOTE: This program is not included in the packages distributed with
cvsdist 9571e5d
Red Hat Linux. The releasenotes specifies a dump before a system
cvsdist 9571e5d
upgrade. 
cvsdist 9571e5d
cvsdist 6f2c3a9
The single biggest problem with upgrading PostgreSQL RPM's has been the lack 
cvsdist 6f2c3a9
of a reasonably automated upgrade process.  PostgreSQL has the property of 
cvsdist 6f2c3a9
the binary on-disk database format changing between major versions (like 
cvsdist 6f2c3a9
between 6.3 and 6.4).  However, a change from 6.5 to 6.5.3 does not change 
cvsdist 6f2c3a9
the on-disk format.
cvsdist 6f2c3a9
cvsdist 68d4798
This property (feature, misfeature, bug, whatever) has been a known property of
cvsdist 68d4798
PostgreSQL since before it was called PostgreSQL -- it has always been this
cvsdist 68d4798
way.  However, the means by which an upgrade is performed is not readily 
cvsdist 68d4798
performed in a fully automated fashion, as a "dump-initdb-restore" cycle has
cvsdist 68d4798
to be performed. This doesn't appear to be too difficult -- however, dumping
cvsdist 68d4798
the old database requires the old executables -- and, if you've already done
cvsdist 68d4798
an rpm -U postgresql* (or upgraded from an older version of RedHat and didn't
cvsdist 68d4798
specifically exclude the postgresql rpms), you no longer have the older 
cvsdist 68d4798
executables to dump your data. And your data is useless (until you reinstall
cvsdist 68d4798
the old version, that is). All RPM's prior to late releases of version 6.5.
cvsdist 68d4798
1 have this upgrade issue.
cvsdist 68d4798
cvsdist 68d4798
The newest RPM's for PostgreSQL attempt to make your job in upgrading a little
cvsdist 68d4798
easier.  First, during the installation of the new RPM's, a copy is made of
cvsdist 68d4798
all the executable files and libraries necessary to make a backup of your data.
cvsdist 68d4798
Second, the initialization script in the new postgresql-server package detects
cvsdist 68d4798
the version of any database found -- if the version is old, then the startup
cvsdist 68d4798
of the new version is aborted.  However, if no database is found, a new one 
cvsdist 68d4798
is made.
cvsdist 68d4798
cvsdist 68d4798
One thing must be remembered -- due to the restructuring of the PostgreSQL
cvsdist 68d4798
RPM's, you will have to manually select the postgresql-server package if you
cvsdist 68d4798
want the server -- it is not installed by default in an upgrade. You can either
cvsdist 68d4798
select it during the upgrade/install, or you can mount your RedHat CD and 
cvsdist 6f2c3a9
install manually with rpm -i.
cvsdist 6f2c3a9
cvsdist 68d4798
To facilitate upgrading, the postgresql-dump utility has been provided.  Look
cvsdist 68d4798
at the man page for postgresql-dump to see its usage.  All executables to
cvsdist 68d4798
restore the immediately prior version of the PostgreSQL database are placed in
cvsdist 68d4798
the directory /usr/lib/pgsql/backup, and are accessed by the postgresql-dump
cvsdist 68d4798
script.  The directory /usr/lib/pgsql/backup is owned by the postgres user -- 
cvsdist 68d4798
you can use this directory to hold dump files and preserve directories.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
The basic sequence is:
cvsdist 6f2c3a9
(as user postgres):
cvsdist 6f2c3a9
postgresql-dump -t /var/lib/pgsql/backup/db.bak -p /var/lib/pgsql/backup/old -d
cvsdist 6f2c3a9
(you can abort the ASCII dump with 'Q', as it uses more) Then, (as user root):
cvsdist 6f2c3a9
cvsdist 6f2c3a9
service postgresql start
cvsdist 6f2c3a9
cvsdist 6f2c3a9
(which will automatically create a new database structure) And finally,
cvsdist 6f2c3a9
cvsdist 6f2c3a9
(as user postgres):
cvsdist 6f2c3a9
psql -e template1 
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Once you are satisfied that the data has been restored properly, you may remove
cvsdist 6f2c3a9
the dump file (/var/lib/pgsql/backup/db.bak) and the preserve directory 
cvsdist 6f2c3a9
(/var/lib/pgsql/backup/old).
cvsdist 6f2c3a9
cvsdist 6f2c3a9
EXPLANATION OF STEPS:
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
postgresql-dump: dumps the old database structure out, using the postmaster and 
cvsdist 6f2c3a9
the backend saved during the rpm upgrade. This step MUST be done as user 
cvsdist 6f2c3a9
postgres.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
/etc/rc.d/init.d/postgresql start: initializes the new database structure that
cvsdist 6f2c3a9
the data from your old version will be restored into, does some sanity 
cvsdist 6f2c3a9
checking, and starts the postmaster.  Due to the nature of some of the tasks, 
cvsdist 6f2c3a9
this step must be done as root.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
psql -e: restores the old database into the new structure created by the 
cvsdist 6f2c3a9
previous step.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
NOTE:
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
If you have added tables, indices, or basically anything to the template1 
cvsdist 6f2c3a9
database which is the default administrative database this script will NOT 
cvsdist 6f2c3a9
upgrade your database. As a matter of fact you will lose your data included 
cvsdist 6f2c3a9
in the template1 database. Please look at www.postgresql.org for information 
cvsdist 6f2c3a9
on upgrading the template1 database. This is a known bug in the PostgreSQL
cvsdist 6f2c3a9
pg_dump and pg_dumpall utilities.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
REGRESSION TESTING
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
One of the features of the newer RPM sets is the capability to perform the 
cvsdist 6f2c3a9
regression tests.  These tests stress your database installation and produce
cvsdist 6f2c3a9
results that give you assurances that the installation is complete, and that
cvsdist 6f2c3a9
your database machine is up to the task.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
To run the regression tests under the RPM installation, make sure that
cvsdist 6f2c3a9
postmaster has been started (if not, su to root and execute the
cvsdist 6f2c3a9
'/etc/rc.d/init.d/postgresql start' init script), cd to
cvsdist 6f2c3a9
/usr/lib/pgsql/test/regress, su to postgres, and execute the command line:
cvsdist 6f2c3a9
time ./pg_regress.sh --schedule=parallel_schedule
cvsdist 6f2c3a9
This command line will start the regression tests and will both show the
cvsdist 6f2c3a9
results to the screen and store the results in the file regress.out.
cvsdist 6f2c3a9
It will also give you a crude benchmark of how fast your machine performs.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
If tests fail, please see the file regression.diffs in that directory.  If
cvsdist 6f2c3a9
you need help interpreting that file, contact the pgsql-ports list on
cvsdist 6f2c3a9
postgresql.org.
cvsdist 6f2c3a9
cvsdist 68d4798
There are some tests that will almost always fail with RedHat Linux 5.x and 6.x
cvsdist 68d4798
installations.  The geometry, float8, and on occassion the random test will 
cvsdist 68d4798
fail.  These failures are normal for RedHat 5.2 and 6.1.  For RedHat 6.1 with
cvsdist 68d4798
certain i18n settings, there will be other tests fail.
cvsdist 6f2c3a9
cvsdist 68d4798
For 7.1RC1, all 76 tests passed on RedHat 6.2 and RedHat 7.0. This
cvsdist 68d4798
was accomplished by fiddling with the locale settings.  In version 7.1.2 this
cvsdist 68d4798
capability was removed -- you need to set your locale to 'C' before executing
cvsdist 68d4798
the first postmaster startup, or many more regression tests will fail.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
For interpretation of the regression tests, see the PostgreSQL documentation.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
STARTING POSTMASTER AUTOMATICALLY AT SYSTEM STARTUP
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 68d4798
RedHat Linux uses the System V Init package.  A startup script for PostgreSQL
cvsdist 6f2c3a9
is provided in the server package, as /etc/rc.d/init.d/postgresql.  To start
cvsdist 68d4798
the postmaster, with sanity checking, as root, run
cvsdist 68d4798
/etc/rc.d/init.d/postgresql start
cvsdist 68d4798
to shut postmaster down,
cvsdist 68d4798
/etc/rc.d/init.d/postgresql stop
cvsdist 6f2c3a9
There are other parameters to this script -- /etc/rc.d/init.d/postgresql for a
cvsdist 6f2c3a9
listing.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
To get this script to run at system startup or any time the system switches into
cvsdist 9636c11
runlevels 3, 4, or 5, run:
cvsdist 9636c11
chkconfig --add postgresql
cvsdist 9636c11
chkconfig --level 345 postgresql on
cvsdist 9636c11
and the proper symlinks will be created.  Check the chkconfig man page for more
cvsdist 9636c11
information.  Note that this is manual -- while the startup script can include
cvsdist 9636c11
tags to allow chkconfig to automatically perform the symlinking, this is not
cvsdist 9636c11
done at this time.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
SuSE has maintained their own RPMset for some time -- their documentation
cvsdist 6f2c3a9
supercedes any found in this file.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
GRAND UNIFIED CONFIGURATION (GUC) FILE
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
The PostgreSQL server has many tunable parameters -- the file 
cvsdist 6f2c3a9
/var/lib/pgsql/data/postgresql.conf is the master configuration file for the
cvsdist 6f2c3a9
whole system.  
cvsdist 6f2c3a9
cvsdist 6f2c3a9
The RPM ships with the default file -- you will need to tune the
cvsdist 6f2c3a9
parameters for your installation.  In particular, you might want to allow
cvsdist 6f2c3a9
TCP/IP socket connections -- in order to allow these, you will need to edit
cvsdist 6f2c3a9
the postgresql.conf file.  The line in question contains the string 
cvsdist 6f2c3a9
'tcpip_socket' --want to both uncomment the line and set the parameter to true
cvsdist 6f2c3a9
in order to get the TCP/IP socket to open.  
cvsdist 6f2c3a9
cvsdist 6f2c3a9
This is the same behavior the -i command line switch provides.  It is 
cvsdist 6f2c3a9
preferable to use the postgresql.conf file, however, as future versions
cvsdist 6f2c3a9
of the RPMset will allow multiple postmaster instances -- and that will only
cvsdist 6f2c3a9
be possible thanks to the decoupling of settings out to each datadir.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
REBUILDING FROM SOURCE RPM
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
If your distribution is not supported by the binary RPM's from PostgreSQL.org, 
cvsdist 6f2c3a9
you will need to rebuild from the source RPM.  Download the .src.rpm for this
cvsdist 6f2c3a9
release.  You will need to be root to rebuild, unless you have already set up
cvsdist 6f2c3a9
a non-root build environment.
cvsdist 6f2c3a9
cvsdist 68d4798
Install the source RPM with rpm -i, then CD to the rpm building area (on RedHat
cvsdist 68d4798
this is /usr/src/redhat by default).  You will have to have a full development
cvsdist 68d4798
environment to rebuild the full RPM set.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
This release of the RPMset includes the ability to conditionally build 
cvsdist 6f2c3a9
sets of packages.  The parameters, their defaults, and the meanings are:
cvsdist 6f2c3a9
cvsdist 9636c11
beta		0	#build with cassert and do not strip the binaries
cvsdist 6f2c3a9
perl		1	#build the postgresql-perl package.
cvsdist 6f2c3a9
tcl		1	#build the postgresql-tcl package.
cvsdist 6f2c3a9
tkpkg		1	#build the postgresql-tk package.  
cvsdist 6f2c3a9
odbc		1	#build the postgresql-odbc package.
cvsdist 6f2c3a9
jdbc		1	#build the postgresql-jdbc package.
cvsdist 6f2c3a9
test		1	#build the postgresql-test package.
cvsdist 6f2c3a9
python		1	#build the postgresql-python package.
cvsdist 6f2c3a9
pltcl		1	#build the postgresql-pltcl package.
cvsdist 6f2c3a9
forceplperl	0	#don't force a build of pl/perl over libperl.a
cvsdist 6f2c3a9
plperl		0	#don't build the postgresql-plperl package.
cvsdist 6f2c3a9
ssl		1	#use OpenSSL support.
cvsdist 6f2c3a9
kerberos	1	#use Kerberos 5 support.
cvsdist 9636c11
nls		1	#build with national language support.
cvsdist 6f2c3a9
enable_mb	1	#enable multibyte encodings.
cvsdist 6f2c3a9
pgaccess	1	#build the pgaccess client, part of postgresql-tk.
cvsdist 6f2c3a9
newintarray	0	#substitute a newer intarray contrib.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
To use these defines, invoke a rebuild like this:
cvsdist 6f2c3a9
rpm --rebuild --define 'perl 0' --define 'tcl 0' --define 'tkpkg 0'\
cvsdist 6f2c3a9
	--define 'test 0' --define 'newintarray 1' --define 'kerberos 0' \
cvsdist 6f2c3a9
	postgresql-7.1.3-1PGDG.src.rpm
cvsdist 6f2c3a9
This line would disable the perl, tcl, tk, and test subpackages, enable the
cvsdist 6f2c3a9
newer intarray code, and disable kerberos support.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
More of these conditionals will be added in the future.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
cvsdist 6f2c3a9
CONTRIB FILES
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
The contents of the contrib tree are packaged into the -contrib subpackage
cvsdist 6f2c3a9
and are compiled and placed into /usr/lib/pgsql/contrib with no further
cvsdist 6f2c3a9
processing.  Please see each directory under contrib for details on how to
cvsdist 6f2c3a9
install and use.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
LOGGING SET UP
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
To get rollable syslog set up, see the documentation for the file
cvsdist 6f2c3a9
postgresql.conf, by default in the directory /var/lib/pgsql/data, as relates to
cvsdist 6f2c3a9
the syslog options.  Then, add a line to /etc/syslog.conf, using the man page
cvsdist 6f2c3a9
for syslog.conf as a source. Example:
cvsdist 6f2c3a9
If postgresql.conf has the following lines for the syslog settings:
cvsdist 6f2c3a9
syslog = 1 # range 0-2
cvsdist 6f2c3a9
syslog_facility = 'LOCAL0'
cvsdist 6f2c3a9
syslog_ident = 'postgres'
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Then you need to add the line to /etc/syslog.conf:
cvsdist 6f2c3a9
local0.*			/var/log/postgresql 
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Then set up an entry in /etc/logrotate.d to roll postgresql the way you want it
cvsdist 6f2c3a9
rolled.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
MORE INFORMATION
cvsdist 6f2c3a9
-------------------------------------------------------------------------------
cvsdist 6f2c3a9
You can get more information at http://www.postgresql.org
cvsdist 6f2c3a9
cvsdist 6f2c3a9
Please help make this packaging better -- let me know if you find problems, or
cvsdist 6f2c3a9
better ways of doing things.  You can reach me by e-mail at
cvsdist 6f2c3a9
pgsql-ports@postgresql.org -- please include an [RPM] string in the subject, as
cvsdist 6f2c3a9
I use automatic mail folder processing to put mail in the right place.
cvsdist 6f2c3a9
cvsdist 6f2c3a9
SuSE information is available at SuSE's website and information contacts.
cvsdist 6f2c3a9
-----------------------------------------------------------------------------
cvsdist 6f2c3a9