Add reference page for pg_ctl.
authorThomas G. Lockhart
Sat, 8 Apr 2000 02:16:26 +0000 (02:16 +0000)
committerThomas G. Lockhart
Sat, 8 Apr 2000 02:16:26 +0000 (02:16 +0000)
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/commands.sgml
doc/src/sgml/ref/pgctl-ref.sgml [new file with mode: 0644]

index 09516b166b0c793f5b5114c18f3e1d713f0c7b53..40c01ed958889fe1cf57216bd28d99b1b2484108 100644 (file)
@@ -1,5 +1,5 @@
 
@@ -114,6 +114,7 @@ Complete list of usable sgml source files in this directory.
 
 
 
+
 
 
 
index 8516904dbf1ecdd239c8ea17a98bde9ebdd26f23..ca6ab04ed1154f5c087c3173b1c418704efc12c9 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -118,6 +118,7 @@ functions supported by Postgres.
    &ecpgRef;
    &pgAccess;
    &pgAdmin;
+   &pgCtl;
    &pgDump;
    &pgDumpall;
    &psqlRef;
diff --git a/doc/src/sgml/ref/pgctl-ref.sgml b/doc/src/sgml/ref/pgctl-ref.sgml
new file mode 100644 (file)
index 0000000..897d421
--- /dev/null
@@ -0,0 +1,419 @@
+
+
+
+  
+   pg_ctl
+  
+  Application
+
+  
+   pg_ctl
+  
+  
+   Starts, stops, and restarts postmaster
+  
+
+  
+   2000-04-05
+  
+
+  
+pg_ctl [-w] [-D datadir][-p path] [-o "options"] start
+pg_ctl [-w] [-D datadir] [-m [s[mart]|f[ast]|i[mmediate]]] stop
+pg_ctl [-w] [-D datadir] [-m [s[mart]|f[ast]|i[mmediate]] [-o "options"] restart
+pg_ctl [-D datadir] status
+  
+
+  
+   </div> <div class="diff add">+    Inputs</div> <div class="diff add">+   
+   
+
+    
+     
+      -w
+      
+       
+   Wait for the database server comes up, by
+   watching for creation of the pid file (PGDATA/postmaster.pid).
+   Times out after 60 seconds.
+       
+      
+     
+
+     
+      -D datadir
+      
+       
+   Specifies the database location for this database installation.
+       
+      
+     
+
+     
+      -p path
+      
+       
+   Specifies the path to the postmaster image.
+       
+      
+     
+
+     
+      -o "options"
+      
+       
+        Specifies options to be passed directly to
+   postmaster.
+       
+       
+   The parameters are usually surrounded by single- or double
+   quotes to ensure that they are passed through as a group.
+       
+      
+     
+
+     
+      -m mode
+      
+       
+   Specifies the shutdown mode.
+
+   
+    
+     smart
+     s
+     
+      
+       smart mode waits for all
+       the clients to logout. This is the default.
+      
+     
+    
+
+    
+     f[ast]
+     f
+     
+      
+       Fast mode sends SIGTERM to the backends, that means
+       active transactions get rolled back.
+      
+     
+    
+
+    
+     immediate
+     i
+     
+      
+       Immediate mode sends SIGUSR1
+       to the backends and lets them abort. In this case, database recovery
+       will be neccessary on the next startup.
+      
+     
+    
+   
+       
+      
+     
+
+     
+      start
+      
+       
+   Start up postmaster.
+       
+      
+     
+
+     
+      stop
+      
+       
+   Shut down postmaster.
+       
+      
+     
+
+     
+      restart
+      
+       
+   Restart the postmaster, performing
+   a stop/start sequence.
+       
+      
+     
+
+     
+      status
+      
+       
+   Show the current state of postmaster.
+       
+      
+     
+    
+   
+  
+
+  
+   
+    1999-11-07
+   
+   </div> <div class="diff add">+    Outputs</div> <div class="diff add">+   
+   
+    
+     
+      pg_ctl: postmaster is state (pid: #)
+      
+       
+   Postmaster status.
+       
+      
+     
+    
+
+    If there is an error condition, the backend error message will be displayed.
+   
+  
+
+  </div> <div class="diff add">+   Description</div> <div class="diff add">+  
+  
+   pg_ctl is a utility for starting,
+   stopping or restarting postmaster.
+  
+
+  </div> <div class="diff add">+   Usage</div> <div class="diff add">+  
+
+  
+   </div> <div class="diff add">+    Starting postmaster</div> <div class="diff add">+   
+
+   
+    To start up postmaster:
+
+    
+> pg_ctl start
+    
+   
+
+   
+    If -w is supplied, pg_ctl waits for the database server comes up, by
+    watching for creation of the pid file (PGDATA/postmaster.pid), for up
+    to 60 seconds.
+   
+
+   
+    Parameters to invoke postmaster are
+    taken from the following sources:
+
+    
+     
+      
+       Path to postmaster: found in the command search path.
+      
+     
+
+     
+      
+       Database directory: PGDATA environment variable.
+      
+     
+
+     
+      
+       Other parameters:
+       PGDATA/postmaster.opts.default.
+      
+     
+    
+   
+
+   
+    postmaster.opts.default contains parameters
+    for postmaster. With a
+    default installation, the  option is enabled.
+    So pg_ctl start implies:
+
+    
+postmaster -S
+    
+   
+
+   
+    Note that postmaster.opts.default is
+    installed by initdb from
+    lib/postmaster.opts.default.sample
+    under the Postgres installation
+    directory (lib/postmaster.opts.default.sample
+    is copied from
+    src/bin/pg_ctl/postmaster.opts.default.sample
+    while installing Postgres).
+   
+
+   
+    To override the default parameters you can use ,
+     and  options.
+   
+
+   
+    An example of starting the
+    postmaster, blocking until
+    postmaster comes up is:
+    
+> pg_ctl -w start
+    
+   
+
+   
+    To specify the postmaster binary path,
+    try:
+
+    
+> pg_ctl -p /usr/local/pgsq/bin/postmaster start
+    
+   
+
+   
+    For a postmaster using port 5433, and
+    running without fsync, use:
+
+    
+> pg_ctl -o "-o -F -p 5433" start
+    
+   
+  
+
+  
+   </div> <div class="diff add">+    Stopping postmaster</div> <div class="diff add">+   
+   
+
+    
+> pg_ctl stop
+    
+
+    stops postmaster. Using the  switch allows one
+    to control how the backend shuts down.
+    
+    waits for postmaster to shut down.
+     specifies the shut down mode.
+   
+  
+
+  
+   </div> <div class="diff add">+    Restarting postmaster</div> <div class="diff add">+   
+
+   
+    This is almost equivalent to stopping the
+    postmaster then starting it
+    again except that the parameters used before stopping
+    it would be used too. This is done by saving them in
+    $PGDATA/postmaster.opts file.
+    ,
+     and
+     
+    can also be used in the restarting mode and they have same meanings as
+    described above.
+   
+
+   
+    To restart postmaster in the simplest
+    form:
+
+    
+> pg_ctl restart
+    
+   
+
+   
+    To restart postmaster,
+    waiting for it to shut down and to come up:
+
+    
+> pg_ctl -w restart
+    
+   
+
+   
+    To restart using port 5433 and disabling fsync after restarting:
+
+    
+> pg_ctl -o "-o -F -p 5433" restart
+    
+   
+  
+
+  
+   </div> <div class="diff add">+    postmaster status</div> <div class="diff add">+   
+
+   
+    To get status information from postmaster:
+
+    
+> pg_ctl status
+    
+   
+
+   
+    Here is a sample output from pg_ctl:
+
+    
+pg_ctl: postmaster is running (pid: 13718)
+options are:
+/usr/local/src/pgsql/current/bin/postmaster
+-p 5433
+-D /usr/local/src/pgsql/current/data
+-B 64
+-b /usr/local/src/pgsql/current/bin/postgres
+-N 32
+-o '-F'
+    
+   
+  
+
+
+