Update and polish postmaster and postgres help output and man pages.
authorPeter Eisentraut
Tue, 14 Nov 2000 18:11:32 +0000 (18:11 +0000)
committerPeter Eisentraut
Tue, 14 Nov 2000 18:11:32 +0000 (18:11 +0000)
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/postmaster.sgml
doc/src/sgml/runtime.sgml
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c

index 4f795665390687496df15a73123549c25974774c..be0fa978de49b846ee9e946b2b7e95a5042b3d33 100644 (file)
 
 
 
+  2000-11-12
+
  
-  
-   postgres
-  
+  postgres
+  1
   Application
  
+
  
-  
-   postgres
-  
-  
-   Run a Postgres single-user backend
-  
+  postgres
+  Run a PostgreSQL single-user backend
  
+
  
-  
-   1999-07-20
-  
-  
-postgres [ dbname ]
-postgres [ -B nBuffers ] [ -C ] [ -D DataDir ] [ -E ] [ -F ]
-   [ -O ] [ -P ] [ -Q ] [ -S SortSize ] [ -d [ DebugLevel ] ] [ -e ]
-   [ -o ] [ OutputFile ] [ -s ] [ -v protocol ] [ dbname ]
-  
-
-  
-   
-    1999-05-19
-   
-   </div> <div class="diff rem">-    Inputs</div> <div class="diff rem">-   
-   
-    postgres accepts the following command line arguments:
-    
-    
-     
-      dbname
-      
-       
-   The optional argument
-   dbname
-   specifies the name of the database to be accessed.
-   dbname
-   defaults to the value of the
-   USER
-   environment variable.
-       
-      
-     
+  
+   
+   postgres
+   -A 01
+   -B nbuffers
+   -c name=value
+   -d debug-level
+   -D datadir
+   -e
+   -E
+   -fsitnmh
+   -F
+   -i
+   -L
+   -N
+   -o file-name
+   -O
+   -P
+   
+    -s
+    -tpaplex
+   
+   -S sort-mem
+   -W seconds
+   database
+   
+   
+   postgres
+   -A 01
+   -B nbuffers
+   -c name=value
+   -d debug-level
+   -D datadir
+   -e
+   -fsitnmh
+   -F
+   -i
+   -L
+   -o file-name
+   -O
+   -p database
+   -P
+   
+    -s
+    -tpaplex
+   
+   -S sort-mem
+   -v protocol-version
+   -W seconds
+  
 
-     
-      -B nBuffers
-      
-       
-   If the backend is running under the 
-   postmaster,
-   nBuffers
-   is the number of shared-memory buffers that the
-   postmaster
-   has allocated for the backend server processes that it starts.  If the
-   backend is running stand-alone, this specifies the number of buffers to
-   allocate.  This value defaults to 64 buffers, where each buffer is 8k bytes
-   (or whatever BLCKSZ is set to in config.h).
-       
-      
-     
+  Description
 
-     
-      -C
-      
-       
-   Do not show the server version number.
-       
-      
-     
-
-     
-      -D DataDir
-      
-       
-   Specifies the directory to use as the root of the tree of database
-   directories.  If -D is not given, the default data directory name is
-   the value of the environment variable 
-   PGDATA.
-   If PGDATA is not set, then the directory used is
-   $POSTGRESHOME/data.
-   If neither environment variable is set and this command-line
-   option is not specified, the default directory that was
-   set at compile-time is used.
-       
-      
-     
+  
+   The postgres executable is the actual
+   PostgreSQL server process that processes
+   queries.  The second form above is how
+   postgres is invoked by the 
+   linkend="app-postmaster" endterm="app-postmaster-title"> (only
+   conceptually, since both postmaster and
+   postgres are in fact the same program); it
+   should not be invoked directly this way.  The first form invokes
+   the server directly in interactive mode.  The primary use for this
+   mode is for bootstrapping by 
+   endterm="app-initdb-title">.
+  
 
-     >
-      -E
-      
-       
-   Echo all queries.
-       
-      
-     >
+  >
+   When invoked in interactive mode from the shell, the user can enter
+   queries and the results will be printed to the screen, but in a
+   form that is more useful for developers than end users.  But note
+   that running a single-user backend is not truly suitable for
+   debugging the server since no realistic inter-process communication
+   and locking will happen.
+  >
 
-     
-      -F
-      
-       
-   Disable an automatic fsync() call after each transaction.
-   This option improves performance, but an operating system crash
-   while a transaction is in progress may  cause the loss of
-   the most recently entered data. Without the fsync() call
-   the data is buffered by the operating system, and written to disk sometime later.
-       
-      
-     
+  
+   When running a stand-alone backend the session user name will
+   automatically be set to the current effective Unix user name.  If
+   that user does not exist the server will not start.
+  
 
-     
-      -O
-      
-       
-   Override restrictions, so system table structures can be modified.
-   These tables are typically those with a leading
-   pg_ in the table name.
-       
-      
-     
+  
+   Options
 
-     
-      -P
-      
-       
-   Ignore system indexes to scan/update system
-   tuples. The REINDEX for system tables/indexes
-   requires this option. System tables are
-   typically those with a leading pg_ in the
-   table name.
-       
-      
-     
+   
+    When postgres is started by a 
+    linkend="app-postmaster" endterm="app-postmaster-title"> then it
+    inherits all options set by the latter.  Additionally,
+    postgres-specific options can be passed
+    from the postmaster with the
+     switch.
+   
 
-     
-      -Q
-      
-       
-   Specifies "quiet" mode.
-       
-      
-     
+   
+    You can avoid having to type these options by setting up a
+    configuration file.  See the Administrator's
+    Guide for details.  Some (safe) options can also be
+    set from the connecting client in an application-dependent way.
+    For example, if the environment variable PGOPTIONS
+    is set, then libpq-based clients will pass that string to the
+    server, which will interpret it as
+    postgres command-line options.
+   
 
-     
-      -S SortSize
-      
-       
-   Specifies the amount of memory to be used by internal sorts and hashes
-   before resorting to temporary disk files.  The value is specified in
-   kilobytes, and defaults to 512 kilobytes.  Note that for a complex query,
-   several sorts and/or hashes might be running in parallel, and each one
-   will be allowed to use as much as
-   SortSize kilobytes
-   before it starts to put data into temporary files.
-       
-      
-     
+   
+    General Purpose
 
-     
-      -d [ DebugLevel ]
-      
-       
-   The optional argument DebugLevel
-   determines the amount of debugging output the backend servers will
-   produce.
-   If DebugLevel
-   is one, the postmaster will trace all connection traffic,
-   and nothing else.
-   For levels two and higher,
-   debugging is turned on in the backend process and the postmaster
-   displays more information,
-   including the backend environment and process traffic.
-   Note that if no file is specified for backend servers to
-   send their debugging output then this output will appear on the
-   controlling tty of their parent postmaster.
-       
-      
-     
+    
+     The options ,
+     ,
+     and  have the same meaning as with the 
+     linkend="app-postmaster" endterm="app-postmaster-title">.
+    
 
+    
      
       -e
       
        
-   This option controls how dates are interpreted upon
-   input to and output from the database.
-   If the 
-   option is supplied, then dates passed to and from the frontend
-   processes will be assumed to be in "European"
-   format (DD-MM-YYYY),
-   otherwise dates are assumed to be in
-   "American" format (MM-DD-YYYY).
-   Dates are accepted by the backend in a wide variety of formats,
-   and for input dates this switch mostly affects the interpretation
-   for ambiguous cases.
-   See the PostgreSQL User's Guide
-   for more information.
+        Sets the default date style to European, which
+   means that the day before month (rather than
+   month before day) rule is used to interpret ambiguous date
+   input, and that the day is printed before the month in certain
+   date output formats.  See the PostgreSQL User's
+   Guide for more information.
        
       
      
 
      
-      -o OutputFile
+      -o file-name
       
        
    Sends all debugging and error output to 
@@ -226,6 +168,17 @@ postgres [ -B nBuffers ] [ -C ] [ -
       
      
 
+     
+      -P
+      
+       
+   Ignore system indexes to scan/update system tuples. The
+   REINDEX command for system tables/indexes
+   requires this option to be used.
+       
+      
+     
+
      
       -s
       
@@ -238,43 +191,42 @@ postgres [ -B nBuffers ] [ -C ] [ -
      
 
      
-      -protocol
+      -sort-mem
       
        
-   Specifies the number of the frontend/backend protocol to be used for this
-   particular session.
+   Specifies the amount of memory to be used by internal sorts and hashes
+   before resorting to temporary disk files.  The value is specified in
+   kilobytes, and defaults to 512 kilobytes.  Note that for a complex query,
+   several sorts and/or hashes might be running in parallel, and each one
+   will be allowed to use as much as
+   sort-mem kilobytes
+   before it starts to put data into temporary files.
        
       
      
-    
-   
 
-   
-    There are several other options that may be specified, used mainly
-    for debugging purposes.  These are listed here only for the use by
-    Postgres system developers.
-    Use of any of these options is highly discouraged.
-    Furthermore, any of these options may disappear or change at any time.
-   
+    
+   
 
-   <para>
-    These special-case options are:
+   <refsect3>
+    Options for stand-alone mode
 
     
      
-      -A [ n | r | b | Q | X ]
+      database
       
        
-   This option generates a tremendous amount of output.
+   Specifies the name of the database to be accessed.  If it is
+   omitted it defaults to the user name.   
        
-     
-    
+      
+     
 
      
-      -L
+      -E
       
        
-   Turns off the locking system.
+   Echo all queries.
        
       
      
@@ -287,6 +239,21 @@ postgres [ -B nBuffers ] [ -C ] [ -
        
       
      
+    
+   
+
+   
+    Semi-internal Options
+
+    
+     There are several other options that may be specified, used
+     mainly for debugging purposes.  These are listed here only for
+     the use by PostgreSQL system
+     developers.  Use of any of these options is highly
+     discouraged.  Furthermore, any of these options may
+     disappear or change in a future release without notice.
+   
+    
 
      
       -f [ s | i | m | n | h ]
@@ -320,123 +287,83 @@ postgres [ -B nBuffers ] [ -C ] [ -
      
 
      
-      -dbname
+      -L
       
        
-   Indicates to the backend server that it has been started by a 
-   postmaster
-   and makes different assumptions about buffer pool management, file
-   descriptors, etc.  Switches following -p are restricted to those
-   considered "secure".
+   Turns off the locking system.
        
       
      
 
      
-      -t pa[rser] | pl[anner] | e[xecutor]
+      -O
       
        
-   Print timing statistics for each query relating to each of the major
-   system modules.  This option cannot be used with 
+   Allows the structure of system tables to be modified.  This is
+   used by initdbtion>.
        
       
      
-    
-   
-  
 
-  
-   
-    1999-05-19
-   
-   </div> <div class="diff rem">-    Outputs</div> <div class="diff rem">-   
-   
-    Of the nigh-infinite number of error messages you may see when you
-    execute the backend server directly, the most common will probably be:
+     
+      -p database
+      
+       
+   Indicates that this server has been started by a
+   postmaster and makes different
+   assumptions about buffer pool management, file descriptors,
+   etc.
+       
+      
+     
 
-    
      
-      
-semget: No space left on device
-       
+      -t pa[rser] | pl[anner] | e[xecutor]
       
        
-   If you see this message, you should run the
-   ipcclean
-   command.  After doing this, try starting
-   postmaster
-   again.  If this still doesn't work, you probably need to configure
-   your kernel for shared memory and semaphores as described in the
-   installation notes.  If you have a kernel with particularly small shared memory
-   and/or semaphore limits, you may have to reconfigure your kernel to increase
-   its shared memory or semaphore parameters.
+   Print timing statistics for each query relating to each of the
+   major system modules.  This option cannot be used together
+   with the  option.
+       
+      
+     
 
-   
-    
-     You may be able to postpone
-     reconfiguring your kernel by decreasing -B to reduce
-     Postgres' shared memory
-     consumption.
-    
-   
+     
+      -v protocol
+      
+       
+   Specifies the version number of the frontend/backend protocol
+   to be used for this particular session.
        
       
      
-    
-   
-  
 
-  
-   1999-05-19
-  
-  </div> <div class="diff rem">-   Description</div> <div class="diff rem">-  
+     
+      -W seconds
+      
+       
+   As soon as this option is encountered, the process sleeps for
+   the specified amount of seconds.  This gives developers time
+   to attach a debugger to the backend process.
+       
+      
+     
 
-  
-   The Postgres backend server can be executed directly from the user shell.
-   This should be done only while debugging by the DBA, and should not be
-   done while other Postgres backends are being managed by a
-   postmaster
-   on this set of databases.
-  
+    
+   
+  
 
-  
-   Some of the switches explained here can be passed to the backend
-   through the "database options" field of a connection request, and thus can be
-   set for a particular backend without going to the trouble of restarting the
-   postmaster.  This is particularly handy for debugging-related switches.
-  
+  See also
 
   
-   The optional argument dbname
-   specifies the name of the database to be accessed.
-   dbname
-   defaults to the value of the
-   USER environment variable.
+   ,
+   ,
+   
   
  
 
-  
-   1998-10-04
-  
-  </div> <div class="diff rem">-   Notes</div> <div class="diff rem">-  
-  
-  
-   Useful utilities for dealing with shared memory problems include
-   ipcs(1),
-   ipcrm(1), and
-   ipcclean(1).
-   See also .
-  
 
 
 
 
 
+  2000-11-12
+
  
-  
-   postmaster
-  
+  postmaster
+  1
   Application
  
+
  
-  
-   postmaster
-  
-  
-   Run the Postgres multi-user backend
-  
+  postmaster
+  PostgreSQL multi-user database server
  
+
  
-  
-   1999-07-20
-  
-  
-postmaster [ -B nBuffers ] [ -D DataDir ] [ -N maxBackends ] [ -S ]
-    [ -d DebugLevel ]
-    [ -h hostname ] [ -i ]
-    [ -k path ] [ -l ]
-    [ -o BackendOptions ] [ -p port ] [ -n | -s ]
-  
-
-  
-   
-    1999-05-19
-   
-   </div> <div class="diff rem">-    Inputs</div> <div class="diff rem">-   
+  
+   postmaster
+   -A 01
+   -B nbuffers
+   -c name=value
+   -d debug-level
+   -D datadir
+   -F
+   -h hostname
+   -i
+   -k filename
+   -l
+   -N max-connections
+   -o extra-options
+   -p port
+   -S
+   -n-s
+  
+
+  Description
+
+  
+   postmaster is the
+   PostgreSQL multi-user database server.
+   In order for a client application to access a database it connects
+   (over a network or locally) to a running
+   postmaster.  The
+   postmaster then starts a separate server
+   process (
+   endterm="app-postgres-title">) to handle the connection.
+   The postmaster also manages the communication among server
+   processes.
+  
+
+  
+   By default the postmaster starts in the foreground and prints log
+   messages to the standard output.  In practical applications the
+   postmaster should be started as a background process, perhaps at
+   boot time.
+  
+
+  
+   One postmaster always manages the data from exactly one database
+   cluster.  A database cluster is a collection of databases that is
+   stored at a common file system location.  When the postmaster
+   starts it needs to know the location of the database cluster files
+   (data area).  This is done with the
+    invocation option or the PGDATA
+   environment variable, there is no default.  More than one
+   postmaster process can run on a system at one time, as long as they
+   use different data areas and different port numbers (see below).  A
+   data area is created with 
+   endterm="app-initdb-title">.
+  
+
+  
+   Options
    
-    postmaster accepts the following command line arguments:
+    postmaster accepts the following
+    command line arguments.  For a detailed discussion of the options
+    consult the Administrator's Guide.  You can
+    also save typing most of these options by setting up a
+    configuration file.
     
     
      
-      -nBuffers
+      -A 0|1
       
        
-   Sets the number of shared-memory disk buffers for the 
-   postmaster
-   to allocate for use by the backend server processes that it
-   starts.  This value defaults to 64 buffers, where each buffer is 8k bytes
-   (or whatever BLCKSZ is set to in src/include/config.h).
+        Enables run-time assert checks, which is a debugging aid to
+        detect programming mistakes.  This is only available if it was
+        enabled during compilation.  If so, the default is on.
        
       
      
 
      
-      -DataDir
+      -nbuffers
       
        
-   Specifies the directory to use as the root of the tree of database
-   directories.  If -D is not given, the default data directory name is
-   the value of the environment variable 
-   PGDATA.
-   If PGDATA is not set, then the directory used is
-   $POSTGRESHOME/data.
-   If neither environment variable is set and this command-line
-   option is not specified, the default directory that was
-   set at compile-time is used.
+   Sets the number of shared buffers for use by the server
+   processes.  This value defaults to 64 buffers, where each
+   buffer is 8 kB.
        
       
      
 
      
-      -maxBackends
+      -name=value
       
        
-   Sets the maximum number of backend server processes that this postmaster
-   is allowed to start.  By default, this value is 32, but it can be set
-   as high as 1024 if your system will support that many processes.
-   (Note that -B is required to be at least twice -N, so you'll need to
-   increase -B if you increase -N.)
-   Both the default and upper limit values for -N can be altered
-   when building Postgres
-   (see src/include/config.h).
+        Sets a named run-time parameter. Consult the
+        Administrator's Guide for a list and
+        descriptions.  Most of the other command line options are in
+        fact short forms of such a parameter assignment.
+       
+
+       
+        On some systems it is also possible to equivalently use
+        GNU-style long options in the form
+        --name=value.
        
       
      
 
      
-      -S
+      -debug-level
       
        
-   Specifies that the postmaster
-   process should start up in silent mode.  That is, it will disassociate
-   from the user's (controlling) tty, start its own process group, and
-   redirect its standard output and standard error to
-   /dev/null.
-       
-       
-   Note that using this switch makes it very
-   difficult to troubleshoot problems, since all tracing and logging
-   output that would normally be generated by this postmaster and its
-   child backends will be discarded.
+        Sets the debug level.  The higher this value is set, the more
+        debugging output is written to the server log.  The default is
+        0, which means no debugging.  Values up to 4 make sense.
        
       
      
 
      
-      -DebugLevel
+      -datadir
       
        
-   Determines the amount of debugging output the backend servers will
-   produce.
-   If DebugLevel
-   is one, the postmaster will trace all connection traffic.
-   Levels two and higher turn on increasing amounts of debug output
-   from the backend processes, and the postmaster
-   displays more information
-   including the backend environment and process traffic.
-   Note that unless the postmaster's standard output and standard error
-   are redirected into a log file, all this output will appear on the
-   controlling tty of the postmaster.
+   Specifies the file system location of the data directory.  See
+   discussion above.
        
       
      
 
      
-      -hostName
+      -F
       
        
-   Specifies the TCP/IP hostname or address
-   on which the postmaster
-   is to listen for connections from frontend applications.  Defaults to
-   the value of the PGHOST 
-   environment variable, or if PGHOST
-   is not set, it defaults to listening on all configured addresses
-   (including localhost).
-       
-       
-   If you use a hostname do not try to run
-   multiple instances of postmaster on the
-   same IP address but different ports.  Doing so will result in them
-   attempting (incorrectly) to use the same shared memory segments.
-   Also, if you use a hostname, all of the host's IP addresses
-   on which postmaster instances are
-   listening must be distinct in the two last octets.
+        Disables fsync calls for performance
+        improvement at the risk of data corruption.  Read the detailed
+        documentation before using this!
        
+      
+     
+
+     
+      -h hostname
+      
        
-   If you don't use this option, each instance must listen on a
-   different port (via -p or PGPORT).  And, of course, do
-   not try to use both approaches on one host.
+   Specifies the TCP/IP hostname or address on which the
+   postmaster is to listen for
+   connections from client applications.  Defaults to the value
+   of the PGHOST environment variable, or if
+   PGHOST is not set, it defaults to listening on
+   all configured addresses (including localhost).
        
       
      
@@ -158,65 +177,63 @@ postmaster [ -B nBuffers ] [ -D 
       -i
       
        
-        Allows clients to connect via TCP/IP (Internet domain) connections.
-   Without this option, only local Unix domain socket connections are
-   accepted.
+        Allows clients to connect via TCP/IP (Internet domain)
+   connections.  Without this option, only local Unix domain
+   socket connections are accepted.
        
       
      
 
      
-      -k path
+      -k filename
       
        
-   Specifies the local Unix domain socket path name
-   on which the postmaster
-   is to listen for connections from frontend applications.  Defaults to
-   the value of the 
-   PGUNIXSOCKET 
-   environment variable, or if PGUNIXSOCKET
-   is not set, then defaults to a file in /tmp
-   constructed from the port number.
+   Specifies the Unix domain socket file name on which the
+   postmaster is to listen for
+   connections from client applications.  Defaults to the value
+   of the PGUNIXSOCKET environment variable, or if
+   PGUNIXSOCKET is not set, then defaults to a
+   file in /tmp constructed from the port
+   number.
        
+      
+     
+
+     
+      -l
+      
        
-        You can use this option to put the Unix-domain socket in a
-        directory that is private to one or more users using Unix
-   directory permissions.  This is necessary for securely
-   creating databases automatically on shared machines.
-        In that situation, also disallow all TCP/IP connections
-   initially in pg_hba.conf.
-   If you specify a socket path other than the
-   default then all frontend applications (including
-   psql) must specify the same
-   socket path using either command-line options or
-   PGUNIXSOCKET.
+   Enables secure connections using SSL.  The 
+   option is also required.  You must have compiled with SSL
+   enabled to use this option.
        
       
      
 
      
-      -l
+      -max-connections
       
        
-   Enables secure connections using SSL.  The  option
-   is also required.
-   You must have compiled with SSL enabled to use this option.
+   Sets the maximum number of client connections that this
+   postmaster will accept.  By default, this value is 32, but it
+   can be set as high as 1024 if your system will support that
+   many processes.  (Note that  is required to
+   be at least twice .)
        
       
      
 
      
-      -o BackendOptions
+      -o extra-options
       
        
-   The 
-   postgres
-   option(s) specified in
-   BackendOptions
-   are passed to all backend server processes started by this
-   postmaster.
-   If the option string contains any spaces, the entire string must be
-   quoted.
+   The command line-style options specified in 
+   class="parameter">EXTRA-OPTIONS are passed to
+   all backend server processes started by this
+   postmaster.  See 
+   linkend="app-postgres" endterm="app-postgres-title"> for
+   possibilities.  If the option string contains any spaces, the
+   entire string must be quoted.
        
       
      
@@ -225,38 +242,54 @@ postmaster [ -B nBuffers ] [ -D 
       -p port
       
        
-   Specifies the TCP/IP port or local Unix domain socket file extension
-   on which the postmaster
-   is to listen for connections from frontend applications.  Defaults to
-   the value of the 
-   PGPORT 
-   environment variable, or if PGPORT
-   is not set, then defaults to the value established when Postgres was
-   compiled (normally 5432).  If you specify a port other than the
-   default port, then all frontend applications (including
-   psql) must specify the same
-   port using either command-line options or
-   PGPORT.
+   Specifies the TCP/IP port or local Unix domain socket file
+   extension on which the postmaster
+   is to listen for connections from client applications.
+   Defaults to the value of the PGPORT environment
+   variable, or if PGPORT is not set, then
+   defaults to the value established during compilation (normally
+   5432).  If you specify a port other than the default port,
+   then all client applications must specify the same port using
+   either command-line options or PGPORT.
        
       
      
+
+     
+      -S
+      
+       
+   Specifies that the postmaster
+   process should start up in silent mode.  That is, it will
+   disassociate from the user's (controlling) terminal, start its
+   own process group, and redirect its standard output and
+   standard error to /dev/null.
+       
+       
+        Using this switch discards all logging output, which is
+   probably not what you want, since it makes it very difficult
+   to troubleshoot problems.  See below for a better way to start
+   the postmaster in the background.
+       
+      
+     
+
     
    
 
    
-    Two additional command line options are available for debugging problems
-    that cause a backend to die abnormally.
-    These options control the behavior of the
-    postmaster in this situation, and
-    neither option is intended for use in
-     ordinary operation.
+    Two additional command line options are available for debugging
+    problems that cause a backend to die abnormally.  These options
+    control the behavior of the postmaster
+    in this situation, and neither option is intended for
+    use in ordinary operation.
    
 
    
     The ordinary strategy for this situation is to notify all other
     backends that they must terminate and then reinitialize the shared
-    memory and semaphores.  This is because an errant backend could have
-    corrupted some shared state before terminating.
+    memory and semaphores.  This is because an errant backend could
+    have corrupted some shared state before terminating.
    
 
    
@@ -292,31 +325,12 @@ postmaster [ -B nBuffers ] [ -D 
   
 
   
-   
-    1999-05-19
-   
    </div> <div class="diff ctx">     Outputs</div> <div class="diff ctx">    
    
 
     
-     
      
       
 semget: No space left on device
@@ -416,124 +430,65 @@ IpcMemoryAttach: shmat() failed: Permission denied
     
    
   
-
-  
-   1999-05-19
-  
-  </div> <div class="diff rem">-   Description</div> <div class="diff rem">-  
-
-  
-   postmaster
-   manages the communication between frontend and backend processes, as
-   well as allocating the shared buffer pool and SysV semaphores
-   (on machines without a test-and-set instruction).
-   postmaster
-   does not itself interact with the user and should be started as a
-   background process.
-  
 
+  Notes
+  
   
-   Only one postmaster should be running at a time in a given
-    Postgres installation.
-   Here, 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.
+   If at all possible, do not use
+   SIGKILL to kill the
+   postmaster.  This will prevent
+   postmaster from freeing the system
+   resources (e.g., shared memory and semaphores) that it holds before
+   terminating.
   
 
-  
-   1998-10-04
-  
-  </div> <div class="diff rem">-   Notes</div> <div class="diff rem">-  
-  
   
-   If at all possible,
-   do not
-   use SIGKILL
-   when killing the postmaster.
-   SIGHUP,
-   SIGINT,
-   or
-   SIGTERM
-   (the default signal for 
-   kill(1))"
-   should be used instead. Using
-
-   
-$ kill -KILL
-   
-
-or its alternative form
-
-   
-$ kill -9
-   
-
-   will prevent postmaster
-   from freeing the system resources (e.g., shared memory and semaphores)
-   that it holds before dying.  Use SIGTERM instead
-   to avoid having to clean up manually (as described earlier).
+   To terminate the postmaster normally, the signals
+   SIGTERMSIGINT, or
+   SIGQUIT can be used.  The first will wait for
+   all clients to terminate before quitting, the second will
+   forcefully disconnect all clients, and the third will quit
+   immediately without lengthy shutdown, resulting in a recovery run
+   during restart.
   
 
   
-   Useful utilities for dealing with shared memory problems include
-   ipcs(1),
-   ipcrm(1), and
-   ipcclean(1).
+   The utility command  can be used to
+   start and shut down the postmaster safely and comfortably.
   
  
-  
-   1998-10-04
-  
-  </div> <div class="diff rem">-   Usage</div> <div class="diff rem">-  
-  
-   To start postmaster using default
-   values, type:
 
-   
-$ nohup postmaster >logfile 2>&1 &
-   
+  Usage
+  
+   To start postmaster in the background
+   using default values, type:
 
-   This command will start up postmaster
-   on the default port (5432). This is the
-   simplest and most common way to start the
-   postmaster.
+
+$ nohup postmaster >logfile 2>&1 </dev/null &
+
   
 
   
-   To start postmaster with a specific port:
-
-   
-$ nohup postmaster -p 1234 &
-   
-
+   To start postmaster with a specific
+   port:
+
+$ postmaster -p 1234
+
    This command will start up postmaster
-   communicating through the port 1234. In order to
-   connect to this postmaster
-   using psql, you would need to run it as
-
-   
-$ psql -p 1234
-   
-
+   communicating through the port 1234. In order to connect to this
+   postmaster using psql, you would need to
+   run it as
+
+$ psql -p 1234
+
    or set the environment variable PGPORT:
-
-   
-$ export PGPORT 1234
-$ psql
-   
+
+$ export PGPORT=1234
+$ psql
+
   
  
 
index 01093c57e025ffd0fcb6914fc1d7b9ed48eaeed0..f7eff6da82194397c281474ba12dfb1a9c1eff14 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -930,7 +930,34 @@ env PGOPTIONS='-c geqo=off' psql
      
 
      
-      KRB_SERVER_KEYFILE
+      HOSTNAME (string)
+      
+       
+   Specifies the TCP/IP hostname or address on which the
+   postmaster is to listen for
+   connections from client applications.  Defaults to the value
+   of the PGHOST environment variable, or if
+   PGHOST is not set, it defaults to listening on
+   all configured addresses (including localhost).
+       
+       
+   If you use a hostname do not try to run multiple instances of
+   postmaster on the same IP address
+   but different ports.  Doing so will result in them attempting
+   (incorrectly) to use the same shared memory segments.  Also,
+   if you use a hostname, all of the host's IP addresses on which
+   postmaster instances are listening
+   must be distinct in the two last octets.
+       
+       
+   If you do not use this option, then each instance must listen
+   on a different port.
+       
+      
+     
+
+     
+      KRB_SERVER_KEYFILE (string)
       
        
         Sets the location of the Kerberos server key file. See
@@ -1056,6 +1083,21 @@ env PGOPTIONS='-c geqo=off' psql
       
      
 
+     
+      UNIXSOCKET (string)
+      
+       
+   Specifies the Unix domain socket file name on which the
+   postmaster is to listen for
+   connections from client applications.  Defaults to the value
+   of the PGUNIXSOCKET environment variable, or if
+   PGUNIXSOCKET is not set, then defaults to a
+   file in /tmp constructed from the port
+   number.
+       
+      
+     
+
      
       UNIX_SOCKET_GROUP (string)
       
index 614f482ba5040aebf170c5eddf2bd3219f20856d..3a140488e4e03572e3ed7843ab25afe2bdb77ef6 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.185 2000/11/14 01:15:01 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.186 2000/11/14 18:11:31 petere Exp $
  *
  * NOTES
  *
@@ -790,30 +790,30 @@ static void
 usage(const char *progname)
 {
    printf("%s is the PostgreSQL server.\n\n", progname);
-   printf("Usage:\n  %s [options]\n\n", progname);
+   printf("Usage:\n  %s [options...]\n\n", progname);
    printf("Options:\n");
 #ifdef USE_ASSERT_CHECKING
-   printf("  -A 1|0          enable/disable runtime assert checking\n");
+   printf("  -A 1|0          enable/disable run-time assert checking\n");
 #endif
-   printf("  -B     number of shared buffers\n");
-   printf("  -c = set run-time parameter\n");
+   printf("  -B NBUFFERS     number of shared buffers (default %d)\n", DEF_NBUFFERS);
+   printf("  -c NAME=VALUE   set run-time parameter\n");
    printf("  -d 1-5          debugging level\n");
-   printf("  -D   database directory\n");
+   printf("  -D DATADIR      database directory\n");
    printf("  -F              turn fsync off\n");
-   printf("  -h hostname     specify hostname or IP address\n");
+   printf("  -h HOSTNAME     host name or IP address to listen to\n");
    printf("  -i              enable TCP/IP connections\n");
-   printf("  -k path         specify Unix-domain socket name\n");
+   printf("  -k FILENAME     Unix domain socket location\n");
 #ifdef USE_SSL
    printf("  -l              enable SSL connections\n");
 #endif
-   printf("  -N      maximum number of allowed connections (1..%d, default %d)\n",
+   printf("  -N MAX-CONNECT  maximum number of allowed connections (1..%d, default %d)\n",
            MAXBACKENDS, DEF_MAXBACKENDS);
-   printf("  -o ' to each backend server\n");
-   printf("  -p        port number to listen on\n");
-   printf("  -S              silent mode (dissociate from tty)\n");
+   printf("  -o OPTIONS      pass 'OPTIONS' to each backend server\n");
+   printf("  -p PORT         port number to listen on (default %d)\n", DEF_PGPORT);
+   printf("  -S              silent mode (start in background without logging output)\n");
 
    printf("\nDeveloper options:\n");
-   printf("  -n              don't reinitialize shared memory after abnormal exit\n");
+   printf("  -n              do not reinitialize shared memory after abnormal exit\n");
    printf("  -s              send SIGSTOP to all backend servers if one dies\n");
 
    printf("\nPlease read the documentation for the complete list of run-time\n"
index 8b84697d73cde452e52962c6cff921f3b2ad939f..72eea36b5aec5e98353505d1de9f1ce88a3527f9 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.187 2000/11/08 17:57:46 petere Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.188 2000/11/14 18:11:32 petere Exp $
  *
  * NOTES
  *   this is the "main" module of the postgres backend and
@@ -1001,38 +1001,41 @@ SigHupHandler(SIGNAL_ARGS)
 }
 
 
+
 static void
 usage(char *progname)
 {
-   fprintf(stderr,
-           "Usage: %s [options] [dbname]\n", progname);
+   printf("%s is the PostgreSQL stand-alone backend.  It is not\nintended to be used by normal users.\n\n", progname);
+
+   printf("Usage:\n  %s [options...] [dbname]\n\n", progname);
+   printf("Options:\n");
 #ifdef USE_ASSERT_CHECKING
-   fprintf(stderr, "\t-A on\t\tenable/disable assert checking\n");
+   printf("  -A 1|0          enable/disable run-time assert checking\n");
 #endif
-   fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n");
-   fprintf(stderr, "\t-c name=value\tset run-time parameter\n");
-   fprintf(stderr, "\t-C \t\tsuppress version info\n");
-   fprintf(stderr, "\t-D dir\t\tdata directory\n");
-   fprintf(stderr, "\t-E \t\techo query before execution\n");
-   fprintf(stderr, "\t-F \t\tturn fsync off\n");
-   fprintf(stderr, "\t-L \t\tturn off locking\n");
-   fprintf(stderr, "\t-N \t\tdon't use newline as interactive query delimiter\n");
-   fprintf(stderr, "\t-O \t\tallow system table structure changes\n");
-   fprintf(stderr, "\t-Q \t\tsuppress informational messages\n");
-   fprintf(stderr, "\t-S kbytes\tset amount of memory for sorts (in kbytes)\n");
-   fprintf(stderr, "\t-T options\tspecify pg_options\n");
-   fprintf(stderr, "\t-W sec\t\twait N seconds to allow attach from a debugger\n");
-   fprintf(stderr, "\t-d [1-5]\tset debug level\n");
-   fprintf(stderr, "\t-e \t\tturn on European date format\n");
-   fprintf(stderr, "\t-f [s|i|n|m|h]\tforbid use of some plan types\n");
-   fprintf(stderr, "\t-i \t\tdon't execute queries\n");
-   fprintf(stderr, "\t-o file\t\tsend stdout and stderr to given filename\n");
-   fprintf(stderr, "\t-p database\tbackend is started under a postmaster\n");
-   fprintf(stderr, "\t-s \t\tshow stats after each query\n");
-   fprintf(stderr, "\t-t [pa|pl|ex]\tshow timings after each query\n");
-   fprintf(stderr, "\t-v version\tset protocol version being used by frontend\n");
+   printf("  -B NBUFFERS     number of shared buffers (default %d)\n", DEF_NBUFFERS);
+   printf("  -c NAME=VALUE   set run-time parameter\n");
+   printf("  -d 1-5          debugging level\n");
+   printf("  -D DATADIR      database directory\n");
+   printf("  -e              use European date format\n");
+   printf("  -E              echo query before execution\n");
+   printf("  -F              turn fsync off\n");
+   printf("  -N              do not use newline as interactive query delimiter\n");
+   printf("  -o FILENAME     send stdout and stderr to given file\n");
+    printf("  -P              disable system indexes\n");
+   printf("  -s              show statistics after each query\n");
+   printf("  -S SORT-MEM     set amount of memory for sorts (in kbytes)\n");
+   printf("Developer options:\n");
+   printf("  -f [s|i|n|m|h]  forbid use of some plan types\n");
+   printf("  -i              do not execute queries\n");
+   printf("  -L              turn off locking\n");
+   printf("  -O              allow system table structure changes\n");
+   printf("  -t [pa|pl|ex]   show timings after each query\n");
+   printf("  -W NUM          wait NUM seconds to allow attach from a debugger\n");
+   printf("\nReport bugs to .\n");
 }
 
+
+
 /* ----------------------------------------------------------------
  * PostgresMain
  *     postgres main loop -- all backends, interactive or otherwise start here
@@ -1646,7 +1649,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
    if (!IsUnderPostmaster)
    {
        puts("\nPOSTGRES backend interactive interface ");
-       puts("$Revision: 1.187 $ $Date: 2000/11/08 17:57:46 $\n");
+       puts("$Revision: 1.188 $ $Date: 2000/11/14 18:11:32 $\n");
    }
 
    /*