aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-03-10 13:50:28 -0400
committerRobert Haas <rhaas@postgresql.org>2014-03-10 13:50:28 -0400
commit5a991ef8692ed0d170b44958a81a6bd70e90585c (patch)
tree02bd510e825655b89c3ae14b6f02ad1b2f08ab53 /doc/src
parentcb9a0c7987466b130fbced01ab5d5481cf3a16df (diff)
downloadpostgresql-5a991ef8692ed0d170b44958a81a6bd70e90585c.tar.gz
postgresql-5a991ef8692ed0d170b44958a81a6bd70e90585c.zip
Allow logical decoding via the walsender interface.
In order for this to work, walsenders need the optional ability to connect to a database, so the "replication" keyword now allows true or false, for backward-compatibility, and the new value "database" (which causes the "dbname" parameter to be respected). walsender needs to loop not only when idle but also when sending decoded data to the user and when waiting for more xlog data to decode. This means that there are now three separate loops inside walsender.c; although some refactoring has been done here, this is still a bit ugly. Andres Freund, with contributions from Álvaro Herrera, and further review by me.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/protocol.sgml24
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index d36f2f3af1f..cb2dfb2ebc0 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1302,10 +1302,13 @@
<para>
To initiate streaming replication, the frontend sends the
-<literal>replication</> parameter in the startup message. This 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.
+<literal>replication</> parameter in the startup message. A boolean value
+of <literal>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.
+Passing <literal>database</> as the value instructs walsender to connect to
+the database specified in the <literal>dbname</> parameter, which will allow
+the connection to be used for logical replication from that database.
The commands accepted in walsender mode are:
@@ -1315,7 +1318,7 @@ The commands accepted in walsender mode are:
<listitem>
<para>
Requests the server to identify itself. Server replies with a result
- set of a single row, containing three fields:
+ set of a single row, containing four fields:
</para>
<para>
@@ -1357,6 +1360,17 @@ The commands accepted in walsender mode are:
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ dbname
+ </term>
+ <listitem>
+ <para>
+ Database connected to or NULL.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</para>
</listitem>