WARNING

This text was automatically converted from troff me macros to HTML. Information may have been lost, added, or changed in the process. Lars Aronsson and Lysator do not guarantee the correctness of this HTML document.

"SECTION 2 *- UNIX COMMANDS (UNIX)"

OVERVIEW

This section contains information on the interaction between POSTGRES and the operating system. In particular, the pages of this section describe the POSTGRES support programs which are executable as UNIX commands.

TERMINOLOGY

In the following documentation, the term site may be interpreted as the host machine on which POSTGRES is installed. But since it is possible to install more than one set of POSTGRES databases on a single host, this term more precisely denotes any particular set of installed POSTGRES binaries and databases.

The "POSTGRES super user" is the user named postgres (usually), who is the owner of the POSTGRES binaries and database files. As the super user, all protection mechanisms may be bypassed and any data accessed arbitrarily. In addition, the POSTGRES super user is allowed to execute some support programs which are generally not available to all users. Note that the postgres super user is not the same as root, and should have a non-zero userid.

The "database base administrator" or DBA is the person who is responsible for installing POSTGRES to enforce a security policy for a site. The DBA will add new users by the method described below, change the status of user-defined functions from untrusted to trusted as explained in define function(commands), and maintain a set of template databases for use by createdb(unix).

The postmaster is a process which acts as a clearing house for requests to the POSTGRES system. Basically, frontend applications connect with the postmaster which keeps tracks of any system errors and communication between the backend processes. The postmaster (POSTMASTER (UNIX)) takes from zero to seven arguments to tune its behavior. Supplying arguments is necessary only if you intend to run multiple sites or a non-default site.

The POSTGRES backend (.../bin/postgres) may be executed directly from the shell by the postgres super user (with the database name as an argument). However, doing this bypasses the shared buffer pool and lock table associated with a postmaster/site, so this is not recommended in a multiuser site.

NOTATION

.../ at the front of file names is used to represent the path to the postgres user's home directory. Anything in brackets ([ and ]) is optional. Anything in braces ({ and }) can be repeated 0 or more times. Parentheses ( ( and ) ) are used to group boolean expressions. | is the boolean operator OR .

USING POSTGRES FROM UNIX

All POSTGRES commands which are executed directly from a UNIX shell are found in the directory &.../bin. Including this directory in your search path will make executing the commands easier.

There is a collection of system catalogs that exist at each site. These include a USER class which contains an instance for each valid POSTGRES user. In the instance is a collection of POSTGRES privileges, the most relevant of which is whether or not creation of POSTGRES databases is allowed. A UNIX user can do nothing at all with POSTGRES until an appropriate record is installed in this system catalog class. Further information on the system catalogs is available by running queries on the appropraiate classes.