1 .\" This is -*-nroff-*-
2 .\" XXX standard disclaimer belongs here....
3 .\" $Header: /cvsroot/pgsql/src/man/Attic/postmaster.1,v 1.2 1996/12/11 00:28:02 momjian Exp $
4 .TH POSTMASTER UNIX 11/05/95 PostgreSQL PostgreSQL
6 postmaster \(em run the Postgres postmaster
46 manages the communication between frontend and backend processes, as
47 well as allocating the shared buffer pool and semaphores (on machines
48 without a test-and-set instruction). The
50 does not itself interact with the user and should be started as a
52 .BR "Only one postmaster should be run on a machine."
56 understands the following command-line options:
60 is the number of shared-memory buffers for the
62 to allocate and manage for the backend server processes that it
63 starts. This value defaults to 64.
66 Specifies the directory to use as the root of the tree of database
67 directories. This directory uses the value of the environment
72 is not set, then the directory used is
74 /data. If neither environment variable is set and this command-line
75 option is not specified, the default directory that was
76 set at compile-time is used.
81 process should start up in silent mode. That is, it will disassociate
82 from the user's (controlling) tty and start its own process group.
83 This should not be used in combination with debugging options because
84 any messages printed to standard output and standard error are
88 Specifies whether or not to use the authentication system
92 for frontend applications to use in connecting to the
96 to enable a system, or
98 to disable a system. For example, to permit users to use
102 to deny any unauthenticated
105 The default is site-specific.
107 .BR "-b" " backend_pathname"
108 .IR "backend_pathname"
109 is the full pathname of the Postgres backend server executable file that
112 will invoke when it receives a connection from a frontend application.
113 If this option is not used, then the
115 tries to find this executable file in the directory in which its own
116 executable is located (this is done by looking at the pathname under
119 was invoked. If no pathname was specified, then the
121 environment variable is searched for an executable named
124 .BR "-d" " [debug_level]"
125 The optional argument
127 determines the amount of debugging output the backend servers will
131 is one, the postmaster will trace all connection traffic,
133 For levels two and higher,
134 debugging is turned on in the backend process and the postmaster
135 displays more information,
136 including the backend environment and process traffic.
137 Note that if no file is specified for backend servers to
138 send their debugging output then this output will appear on the
139 controlling tty of their parent
144 .IR "-s" " and " "-n"
145 options control the behavior of the
147 when a backend dies abnormally. \fBNeither option is intended for use in
148 ordinary operation\fP.
150 The ordinary strategy for this situation is to notify all other
151 backends that they must terminate and then reinitialize the shared
152 memory and semaphores. This is because an errant backend could have
153 corrupted some shared state before terminating.
157 option is supplied, then the
159 will stop all other backend processes by sending the signal
161 but will not cause them to terminate. This permits system programmers
162 to collect core dumps from all backend processes by hand.
166 option is supplied, then the
168 does not reinitialize shared data structures. A knowledgable system
169 programmer can then use the
171 program to examine shared memory and semaphore state.
173 .BR "-o" " backend_options"
177 .IR "backend_options"
178 are passed to all backend server processes started by this
180 If the option string contains any spaces, the entire string must be
184 Specifies the Internet TCP port on which the
186 is to listen for connections from frontend applications. Defaults to
187 5432, or the value of the
189 environment variable (if set). If you specify a port other than the
190 default port then all frontend application users must specify the same
191 port (using command-line options or
193 ) when starting any libpq application, including psql.
205 (the default signal for
207 should be used instead. Hence, avoid
211 or its alternative form
215 as this will prevent the
217 from freeing the system resources (e.g., shared memory and semaphores)
218 that it holds before dying. This prevents you from having to deal with
225 # start postmaster using default values
226 nohup postmaster >logfile 2>&1 &
229 This command will start up
231 on the default port (5432) and will search
233 to find an executable file called \*(lqpostgres\*(rq. This is the
234 simplest and most common way to start the
238 # start with specific port and executable name
239 nohup postmaster -p -b /usr/postgres/bin/postgres &
242 This command will start up a
244 communicating through the port 1234, and will attempt to use the
245 backend located at \*(lq/usr/postgres/bin/postgres\*(rq. In order to
248 using psql, you would need to either
253 command-line or set the environment variable
264 .BR "FindBackend: could not find a backend to execute..."
265 If you see this message, you do not have the
267 executable in your path. Add the directoy in which postgres resides to
270 .BR "semget: No space left on device"
271 If you see this message, you should run the
273 command. After doing this, try starting the
275 again. If this still doesn't work, you probably need to configure
276 your kernel for shared memory and semaphores as described in the
277 installation notes. If you run multiple
279 on a single host, or have reduced the shared memory and semaphore
280 parameters from the defaults in the generic kernel, you may have to
281 go back and increase the shared memory and semaphores configured
284 .BR "StreamServerPort: cannot bind to port"
285 If you see this message, you should be certain that there is no other
287 process already running. The easiest way to determine this is by
290 ps -ax | grep postmaster
294 ps -e | grep postmast
296 (the equivalent syntax is on System V-like or POSIX-compliant systems such as HP-UX). If you
297 are sure that no other
299 processes are running and you still get this error, try specifying a
300 different port using the
302 option. You may also get this error if you terminate the
304 and immediately restart it using the same port; in this case, you must
305 simply wait a few seconds until the operating system closes the port
306 before trying again. Finally, you may get this error if you specify
307 a port number that your operating system considers to be reserved.
308 For example, many versions of Unix consider port numbers under 1024 to
309 be \*(lqtrusted\*(rq and only permit the Unix superuser to access them.
311 .BR "IpcMemoryAttach: shmat() failed: Permission denied"
312 A likely explanation is that another user attempted to start a
314 process on the same port which acquired shared resources and then
315 died. Since Postgres shared memory keys are based on the port number
318 such conflicts are likely if there is more than one installation on
319 a single host. If there are no other
321 processes currently running (see above), run
323 and try again. If other
325 are running, you will have to find the owners of those processes to
326 coordinate the assignment of port numbers and/or removal of unused
327 shared memory segments.