Update SGML contrib documentation to catch up with recent changes to
authorTom Lane
Mon, 3 Dec 2007 03:05:47 +0000 (03:05 +0000)
committerTom Lane
Mon, 3 Dec 2007 03:05:47 +0000 (03:05 +0000)
the former README files.  Albert Cervera i Areny

doc/src/sgml/cube.sgml
doc/src/sgml/intarray.sgml
doc/src/sgml/pageinspect.sgml
doc/src/sgml/pgbench.sgml
doc/src/sgml/pgrowlocks.sgml
doc/src/sgml/pgstandby.sgml

index c0a0911701193734573f8bc422d16052b5d55b91..507a55cbd7bf083f24bc680e5244a9c5c33b27cd 100644 (file)
@@ -352,6 +352,12 @@ a <@ b                Contained in
        cubes are points, this is the normal distance function.
       
      
+     
+      cube(text)
+      Takes text input and returns a cube. This is useful for making 
+      cubes from computed strings.
+      
+     
      
       cube(float8) returns cube
       This makes a one dimensional cube with both coordinates the same.
index e3240f6189e6f0e624b4fd9f6ae710127f206141..b01d825cee56c6914211a1d36776cc1637bcaa77 100644 (file)
 
  
   Current implementation provides index support for one-dimensional array of
-  int4's - gist__int_ops, suitable for small and medium size of arrays (used on
+  integers: gist__int_ops, suitable for small and medium size of arrays (used by 
   default), and gist__intbig_ops for indexing large arrays (we use superimposed
-  signature with length of 4096 bits to represent sets).
+  signature with length of 4096 bits to represent sets). There is also a 
+  non-default gin__int_ops for GIN indexes on integer arrays.
  
 
  
index 3fe1edf378fc32fe60523cb2463c5de98ff406a3..c7ebe1f730e184151f4f44118af65e579dc88811 100644 (file)
      A page image obtained with get_raw_page should be passed as argument:
     
     
-        test=# SELECT * FROM page_header(get_raw_page('pg_class',0));
-           lsn    | tli | flags | lower | upper | special | pagesize | version
-        ----------+-----+-------+-------+-------+---------+----------+---------
-         0/3C5614 |   1 |     1 |   216 |   256 |    8192 |     8192 |       4
-        (1 row)
+regression=# SELECT * FROM page_header(get_raw_page('pg_class',0));
+     lsn    | tli | flags | lower | upper | special | pagesize | version | prune_xid
+      -----------+-----+-------+-------+-------+---------+----------+---------+-----------
+        0/24A1B50 |   1 |     1 |   232 |   368 |    8192 |     8192 |       4 |         0
     
     
-     The returned columns correspond to the fields in the PageHeaderData-struct,
-     see src/include/storage/bufpage.h for more details.
+     The returned columns correspond to the fields in the PageHeaderData struct.
+     See src/include/storage/bufpage.h for more details.
     
    
 
index 750d78e357dfc4c985d031f37f65729963c2c4c2..0e9dcfab442535daa9a5bb02199122eea7f8fd05 100644 (file)
@@ -380,6 +380,20 @@ SELECT abalance FROM accounts WHERE aid = :aid
      Variables can also be defined by using -D option.
     
    
+   
+    
+     \sleep num [us|ms|s] - Causes script execution to sleep for the
+     specified duration of microseconds (us), milliseconds (ms) or the default
+     seconds (s).
+    
+    
+     Example:
+    
+    
+\setrandom millisec 1000 2500
+\sleep : millisec ms
+    
+   
   
  
 
index 4793f59ef2aad3c088a0258df1ec6f8dfea9f59c..140b33387f90042e63585bef14f059e7983fb3c8 100644 (file)
@@ -102,7 +102,7 @@ SELECT * FROM accounts AS a, pgrowlocks('accounts') AS p WHERE p.locked_ row = a
  
   Example
   
-   pgrowlocks returns the following data type:
+   pgrowlocks returns the following columns:
   
   
    Here is a sample execution of pgrowlocks:
index 3aafa09dbca395bb5d8dac8c7cc4982a59ef430c..a8ed57edb4156e3d906ecd682c0369047bf73b5a 100644 (file)
@@ -6,9 +6,9 @@
  
 
  
-  pg_standby is a production-ready program that can be used 
-  to create a Warm Standby server. Other configuration is required as well, 
-  all of which is described in the main server manual.
+  pg_standby allows the creation of a Warm Standby server. 
+  Other configuration is required as well, all of which is described in the 
+  main server manual.
  
  
   The program is designed to be a wait-for restore_command
@@ -17,7 +17,7 @@
   you could configure pg_standby in the following way:
  
  
-   restore_command = 'pg_standby archiveDir %f %p'
+restore_command = 'pg_standby archiveDir %f %p %r'
  
  
   which would be sufficient to define that files will be restored from 
    with the pg_standby command usage as
   
   
-   pg_standby [OPTION]... [ARCHIVELOCATION] [NEXTWALFILE] [XLOGFILEPATH]
+   pg_standby [OPTION]... ARCHIVELOCATION NEXTWALFILE XLOGFILEPATH [RESTARTWALFILE]
   
   
    When used within the restore_command the %f and %p macros
    will provide the actual file and path required for the restore/recovery.
   
+  
+   pg_standby assumes that ARCHIVELOCATION
+   is a directory accessible by the server-owning user.
+  
+  
+   If RESTARTWALFILE is specified, typically by using the 
+   %r option, then all files prior to this file will be 
+   removed from ARCHIVELOCATION. This then minimises the 
+   number of files that need to be held, whilst at the same time maintaining 
+   restart capability. This capability additionally assumes that 
+   ARCHIVELOCATION directory is writable.
+  
 
   
    Options
       -k numfiles
       
        
-        Cleanup files in the archive so that we maintain no more
-        than this many files in the archive. 
+        Cleanup files in the archive so that we maintain no more than this 
+        many files in the archive. This parameter will be silently ignored if
+        RESTARTWALFILE is specified, since that
+        specification method is more accurate in determining the correct
+        cut-off point in archive.
        
        
         You should be wary against setting this number too low,
         It is wholly unrelated to the setting of checkpoint_segments
         on either primary or standby.
        
+       
+        Setting numfiles to be zero will disable deletion
+        of files from ARCHIVELOCATION.
+       
        
         If in doubt, use a large value or do not set a value at all.
        
+       
+        If you specify neither RESTARTWALFILE nor -k,
+        then -k 0 will be assumed, i.e. keep all files in archive.
+       
       
      
      
         WAL files will remain in archive
        
        
-        Link is more efficient, but the default is copy to 
-        allow you to maintain the WAL archive for recovery
-        purposes as well as high-availability.
+        Link is more efficient, but the default is copy to allow you to 
+        maintain the WAL archive for recovery purposes as well as 
+        high-availability. The default setting is not necessarily recommended,
+        consult the main database server manual for discussion.
        
        
         This option uses the Windows Vista command mklink
         we will wait 5 secs, 10 secs then 15 secs before reporting
         the failure back to the database server. This will be
         interpreted as and end of recovery and the Standby will come
-        up fully as a result. Default=3
+        up fully as a result. Default=3 Min=0
        
       
      
        if the file to be restored is available in the archive yet.
        The default setting is not necessarily recommended,
        consult the main database server manual for discussion.
-       Default=5
+       Default=5, Min=1, Max=60
       
      
      
        the maximum number of seconds to wait for the next file,
        after which recovery will end and the Standby will come up.
        The default setting is not necessarily recommended,
-       consult the main database server manual for discussion.
-       Default=0
+       consult the main database server manual for discussion. A setting of
+       zero means wait forever.
+       Default=0, Min=0
       
      
     
   
  
 
+  Supported versions
+  
+   pg_standby is designed to work with PostgreSQL 8.2 and
+   and later. It is currently compatible across minor changes between the way
+   8.3 and 8.2 operate.
+  
+  
+   PostgreSQL 8.3 provides the %r command line substitution,
+   designed to let pg_standby know the last file it needs to
+   keep. If the last parameter is omitted, no error is generated, allowing 
+   pg_standby to function correctly with PostgreSQL 8.2 
+   also. With PostgreSQL 8.2, the -k option must be used if 
+   archive cleanup is required. This option remains available in 8.3.
+  
+
+  Additional design notes
+  
+   The use of a move command seems like it would be a good idea, but this would
+   prevent recovery from being restartable. Also, the last WAL file is always 
+   requested twice from the archive.
+  
+
  
   Examples
 
@@ -227,8 +278,7 @@ archive_command = 'copy %p ..\\archive\\%f'
      *not* in the restore_command, in 8.2, 8.1, 8.0 on Windows.
     
     
-restore_command = 'pg_standby -c -d -s 5 -w 0 -t C:\pgsql.trigger.5442
- ..\archive %f %p 2>> standby.log'
+restore_command = 'pg_standby -c -d -s 5 -w 0 -t C:\pgsql.trigger.5442 ..\archive %f %p 2>> standby.log'
     
     
      which will