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.

NAME

postmaster *- run the POSTGRES postmaster

SYNOPSIS

postmaster [ -p port ] [ -b backend_pathname ] [ -d debug_level ] [ -s ] [ -n ] &

DESCRIPTION

The postmaster manages the communication between frontends and backends, as well as allocating the shared buffer pool and semaphores (on machines without TAS). The postmaster does not itself interact with the user so it should be started as a background process. Only one postmaster should be run on a machine!

COMMAND OPTIONS

port is the well known TCP/IP port used for network communication between a libpq application and the backend. If you specify a port other than the default port then you must specify the same port when starting any libpq application including the terminal monitor. Alternatively you may set the environment variable PGPORT to the specified port and all libpq applications will use it instead of the default.

backend_pathname is the full pathname of the POSTGRES backend you wish to use.

deug_level determines the amount of debugging output the backend will produce. Specifying any level will cause the postmaster to print out a few terse debugging output messages to the tty on which it was started.

The -s and -n options control the behavior of the postmaster when a backend dies abnormally. The ordinary strategy for this situation is to notify all other backends that they must terminate, and to reinitialize shared memory and semaphores. This is because an errant backend, before dumping core, could have contaminated some shared state.

If the -s option is supplied, then the postmaster will stop all other backends, but will not cause them to terminate. This permits system programmers to collect core dumps from all concurrent backends by hand.

If the -n command-line option is supplied, then the postmaster does not reinitialize shared data structures. A knowledgable system programmer can use the shmemdoc program to examine shared memory and semaphore state, in order to debug the problem.

Neither -s nor -n is intended for use in ordinary operation.

EXAMPLES

postmaster &

This command will start up a postmaster on the default port (4321) and will expect to use the default path to the POSTGRES backend ($POSTGRESHOME/bin/postgres) or /usr/postgres/bin/postgres. This is the simplest and most common way to start the postmaster.

postmaster -p 1234 -b /a/postgres/bin/postgres &

This command will start up a postmaster communicating through the port 1234, and will expect to use the backend located at /a/postgres/bin/postgres. Note: to connect to this postmaster using the terminal monitor, you would need to specify -p 1234 on the command line invoking the terminal monitor.

DIAGNOSTICS

semget: No space left on device

If you see this message, you should run the ipcclean command. After doing this, try starting the postmaster again. If this still doesn't work, you will need to configure your kernel for shared memory and semaphores as described in the installation notes.

StreamServerPort: cannot bind to port

If you see this message, you should be certain that there is no other postmaster program already running. The easiest way to determine this is by the command "ps -ax | grep postmaster". If you are sure there is no other postmaster running and you still get this error try specifying a different port using the -p option. You may also get this error if you terminate the postmaster and immediately restart it using the same port; in this case, you should simply wait until the operating system closes the port.

SEE ALSO

postgres(unix), monitor(unix), ipcclean(unix), shmemdoc(unix).