Internet Express for Tru64 UNIX Version 6.8 Administration Guide (14233)

Table 17-1 PostgreSQL Files and Directories
ContentsDirectory
Location of PostgreSQL reference pages.
/usr/internet/pgsql/man
Location of the PostgreSQL documentation.
/usr/internet/pgsql/doc
Location of the PostgreSQL commands.
/usr/internet/pgsql/bin/
Home directory of the PostgreSQL account where all files
and directories are installed.
/usr/internet/pgsql/
Contains a set of environment variable definitions for
running most PostgreSQL commands.
/usr/internet/pgsql/.profile
Command for defining the environment and running any
PostgreSQL commands.
/usr/internet/pgsql/bin/pg_wrap
File for configuring access control to a PostgreSQL
database.
/usr/internet/pgsql/data/pg_hba.conf
Contains the pre-compiled jdbc drivers.
/usr/internet/pgsql/jdbc
17.4.2 Running the Postmaster Startup Script
The postmaster daemon manages the communication between frontend and backend processes.
It automatically runs as a background process when you install PostgreSQL and when you reboot.
(Postmaster does not interact with the user.) Only one postmaster should be running at a time
in a given PostgreSQL installation. An installation means a database directory and postmaster
port number. You can run more than one postmaster on a machine only if each one has a separate
directory and port number.
Internet Express provides a startup script for postmaster in /sbin/init.d/postgres and a
symbolic link in /sbin/rc3.d/S70postgres, which ensures that the postmaster daemon
always runs.
17.4.3 Using Existing PostgreSQL Accounts
The Internet Express installation procedure creates a default PostgreSQL account (postgres).
If you already have an existing account, possibly in another directory, use the pg_wrap command
in /usr/internet/pgsql/bin/pg_wrap as a prefix to any other PostgreSQL command you
run. This command resets the environment variables to the existing account.
17.5 Setting up a Crontab Entry for Vacuuming Databases
As part of routine database maintenance and to ensure that PostgreSQL runs efficiently,
periodically run a vacuum on your database.
Vacuuming a database allows you to:
Recover disk space occupied by updated or deleted rows in the database.
Because data affected by update or delete procedures are not immediately removed by
PostgreSQL, you can remove the data by periodically vacuuming the database. When you
run the vacuum on your database, disk space is opened for reuse and disk space requirement
are kept low.
Protect against loss of data due to transaction ID wrap-around.
PostgreSQL assigns each transaction a unique ID, which determines the chronology of
transactions. The ID has a fixed length of 32 bits. When the server has been running for a
long time (more than 4 billion transactions), the transaction ID will eventually wrap to zero.
This can cause old transactions to reappear, resulting in catastrophic data loss. Periodically
vacuuming the database prevents this type of transaction ID wrap-around.
258 PostgreSQL Database and MySQL Administration