doc: Add replication parameter to libpq documentation
authorPeter Eisentraut
Wed, 7 Mar 2018 02:00:10 +0000 (21:00 -0500)
committerPeter Eisentraut
Wed, 7 Mar 2018 02:00:10 +0000 (21:00 -0500)
Author: Michael Paquier 
Reported-by: Şahap Aşçı
Reviewed-by: Vik Fearing
doc/src/sgml/libpq.sgml
doc/src/sgml/protocol.sgml

index 2a8e1f2e07d99665c457baaa5bf2342c7c2768af..da9421486b443d04807db0ec17dd6dd3575384ec 100644 (file)
@@ -1262,6 +1262,64 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
       
      
 
+     
+      replication
+      
+      
+       This option determines whether the connection should use the
+       replication protocol instead of the normal protocol.  This is what
+       PostgreSQL replication connections as well as tools such as
+       pg_basebackup use internally, but it can
+       also be used by third-party applications.  For a description of the
+       replication protocol, consult .
+      
+
+      
+       The following values, which are case-insensitive, are supported:
+       
+        
+         
+          trueon,
+          yes1
+         
+         
+          
+           The connection goes into physical replication mode.
+          
+         
+        
+
+        
+         database
+         
+          
+           The connection goes into logical replication mode, connecting to
+           the database specified in the dbname parameter.
+          
+         
+        
+
+        
+         
+          falseoff,
+          no0
+         
+         
+          
+           The connection is a regular one, which is the default behavior.
+          
+         
+        
+       
+      
+
+      
+       In physical or logical replication mode, only the simple query protocol
+       can be used.
+      
+      
+     
+
      
       sslmode
       
index 3cec9e0b0c7840efd7ecf14c0e824ea591a4b388..4fd61d7c2d2c0b52ef82f8ddebb0410123a45917 100644 (file)
@@ -1635,16 +1635,27 @@ that cannot support tls-unique for some reason.
 
 
 To initiate streaming replication, the frontend sends the
-replication parameter in the startup message. A Boolean value
-of true tells the backend to go into walsender mode, wherein a
-small set of replication commands can be issued instead of SQL statements. Only
-the simple query protocol can be used in walsender mode.
-Replication commands are logged in the server log when
- is enabled.
-Passing database as the value instructs walsender to connect to
-the database specified in the dbname parameter, which will allow
-the connection to be used for logical replication from that database.
+replication parameter in the startup message. A Boolean
+value of true (or on,
+yes1) tells the backend to go into
+physical replication walsender mode, wherein a small set of replication
+commands, shown below, can be issued instead of SQL statements.
+
+
+
+Passing database as the value for the
+replication parameter instructs the backend to go into
+logical replication walsender mode, connecting to the database specified in
+the dbname parameter.  In logical replication walsender
+mode, the replication commands shown below as well as normal SQL commands can
+be issued.
+
+
+
+In either physical replication or logical replication walsender mode, only the
+simple query protocol can be used.
 
+
 
  For the purpose of testing replication commands, you can make a replication
  connection via psql or any other libpq-using
@@ -1659,7 +1670,12 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
 
 
 
-The commands accepted in walsender mode are:
+Replication commands are logged in the server log when
+ is enabled.
+
+
+
+The commands accepted in replication mode are:
 
   
     IDENTIFY_SYSTEM