1 .\" This is -*-nroff-*-
2 .\" XXX standard disclaimer belongs here....
3 .\" $Header: /cvsroot/pgsql/src/man/Attic/postmaster.1,v 1.10 1998/01/11 22:17:53 momjian Exp $
4 .TH POSTMASTER UNIX 11/05/95 PostgreSQL PostgreSQL
6 postmaster - run the Postgres postmaster
49 manages the communication between frontend and backend processes, as
50 well as allocating the shared buffer pool and semaphores (on machines
51 without a test-and-set instruction). The
53 does not itself interact with the user and should be started as a
55 .BR "Only one postmaster should be run on a machine."
59 understands the following command-line options:
63 is the number of shared-memory buffers for the
65 to allocate and manage for the backend server processes that it
66 starts. This value defaults to 64, and each buffer is 8k bytes.
69 Specifies the directory to use as the root of the tree of database
70 directories. This directory uses the value of the environment
75 is not set, then the directory used is
77 /data. If neither environment variable is set and this command-line
78 option is not specified, the default directory that was
79 set at compile-time is used.
84 process should start up in silent mode. That is, it will disassociate
85 from the user's (controlling) tty and start its own process group.
86 This should not be used in combination with debugging options because
87 any messages printed to standard output and standard error are
91 Specifies whether or not to use the authentication system
95 for frontend applications to use in connecting to the
99 to enable a system, or
101 to disable a system. For example, to permit users to use
105 to deny any unauthenticated
108 The default is site-specific.
110 .BR "-b" " backend_pathname"
111 .IR "backend_pathname"
112 is the full pathname of the Postgres backend server executable file that
115 will invoke when it receives a connection from a frontend application.
116 If this option is not used, then the
118 tries to find this executable file in the directory in which its own
119 executable is located (this is done by looking at the pathname under
122 was invoked. If no pathname was specified, then the
124 environment variable is searched for an executable named
127 .BR "-d" " [debug_level]"
128 The optional argument
130 determines the amount of debugging output the backend servers will
134 is one, the postmaster will trace all connection traffic,
136 For levels two and higher,
137 debugging is turned on in the backend process and the postmaster
138 displays more information,
139 including the backend environment and process traffic.
140 Note that if no file is specified for backend servers to
141 send their debugging output then this output will appear on the
142 controlling tty of their parent
146 This enables TCP/IP or Internet domain socket communication.
147 Without this option, only local Unix domain socket communication is
152 .IR "-s" " and " "-n"
153 options control the behavior of the
155 when a backend dies abnormally. \fBNeither option is intended for use in
156 ordinary operation\fP.
158 The ordinary strategy for this situation is to notify all other
159 backends that they must terminate and then reinitialize the shared
160 memory and semaphores. This is because an errant backend could have
161 corrupted some shared state before terminating.
165 option is supplied, then the
167 will stop all other backend processes by sending the signal
169 but will not cause them to terminate. This permits system programmers
170 to collect core dumps from all backend processes by hand.
174 option is supplied, then the
176 does not reinitialize shared data structures. A knowledgable system
177 programmer can then use the
179 program to examine shared memory and semaphore state.
181 .BR "-o" " backend_options"
185 .IR "backend_options"
186 are passed to all backend server processes started by this
188 If the option string contains any spaces, the entire string must be
192 Specifies the TCP/IP port or local Unix domain socket file extension
195 is to listen for connections from frontend applications. Defaults to
196 5432, or the value of the
198 environment variable (if set). If you specify a port other than the
199 default port then all frontend application users must specify the same
200 port (using command-line options or
202 ) when starting any libpq application, including psql.
214 (the default signal for
216 should be used instead. Hence, avoid
220 or its alternative form
224 as this will prevent the
226 from freeing the system resources (e.g., shared memory and semaphores)
227 that it holds before dying. This prevents you from having to deal with
234 # start postmaster using default values
235 nohup postmaster >logfile 2>&1 &
238 This command will start up
240 on the default port (5432) and will search
242 to find an executable file called \*(lqpostgres\*(rq. This is the
243 simplest and most common way to start the
247 # start with specific port and executable name
248 nohup postmaster -p -b /usr/postgres/bin/postgres &
251 This command will start up a
253 communicating through the port 1234, and will attempt to use the
254 backend located at \*(lq/usr/postgres/bin/postgres\*(rq. In order to
257 using psql, you would need to either
262 command-line or set the environment variable
273 .BR "FindBackend: could not find a backend to execute..."
274 If you see this message, you do not have the
276 executable in your path. Add the directoy in which postgres resides to
279 .BR "semget: No space left on device"
280 If you see this message, you should run the
282 command. After doing this, try starting the
284 again. If this still doesn't work, you probably need to configure
285 your kernel for shared memory and semaphores as described in the
286 installation notes. If you run multiple
288 on a single host, or have reduced the shared memory and semaphore
289 parameters from the defaults in the generic kernel, you may have to
290 go back and increase the shared memory and semaphores configured
293 .BR "StreamServerPort: cannot bind to port"
294 If you see this message, you should be certain that there is no other
296 process already running. The easiest way to determine this is by
299 ps -ax | grep postmaster
303 ps -e | grep postmast
305 (the equivalent syntax is on System V-like or POSIX-compliant systems such as HP-UX). If you
306 are sure that no other
308 processes are running and you still get this error, try specifying a
309 different port using the
311 option. You may also get this error if you terminate the
313 and immediately restart it using the same port; in this case, you must
314 simply wait a few seconds until the operating system closes the port
315 before trying again. Finally, you may get this error if you specify
316 a port number that your operating system considers to be reserved.
317 For example, many versions of Unix consider port numbers under 1024 to
318 be \*(lqtrusted\*(rq and only permit the Unix superuser to access them.
320 .BR "IpcMemoryAttach: shmat() failed: Permission denied"
321 A likely explanation is that another user attempted to start a
323 process on the same port which acquired shared resources and then
324 died. Since Postgres shared memory keys are based on the port number
327 such conflicts are likely if there is more than one installation on
328 a single host. If there are no other
330 processes currently running (see above), run
332 and try again. If other
334 are running, you will have to find the owners of those processes to
335 coordinate the assignment of port numbers and/or removal of unused
336 shared memory segments.