Hi,

There's a brief mention of CREATE_REPLICATION_SLOT exporting a snapshot here:


https://www.postgresql.org/docs/devel/static/logicaldecoding-explanation.html#AEN71570

but how to access the snapshot identifier is not documented anywhere. So I came up with the attached patch (against master). Please have a looksie.


.m
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 68b0941..6bf8354 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1475,6 +1475,49 @@ The commands accepted in walsender mode are:
        </listitem>
       </varlistentry>
      </variablelist>
+    <para>
+     In response to this command, the server will send a one-row result set
+     containing the following fields:
+     <variablelist>
+      <varlistentry>
+       <term><literal>slot_name</literal> (<type>text</type>)</term>
+       <listitem>
+        <para>
+         The name of the newly-created replication slot.
+        </para>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><literal>consistent_point</literal> (<type>text</type>)</term>
+       <listitem>
+        <para>
+         The WAL position at which the slot became consistent.  This is the
+         earliest location from which streaming can start on this replication
+         slot.
+        </para>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><literal>snapshot_name</literal> (<type>text</type>)</term>
+       <listitem>
+        <para>
+         The identifier of the snapshot exported by the command.  The snapshot
+         is valid until a new command is executed or the replication connection is
+         closed.  NULL if the created slot is physical.
+        </para>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><literal>output_plugin</literal> (<type>text</type>)</term>
+       <listitem>
+        <para>
+         The name of the output plugin used by the newly-created replication
+         slot.  NULL if the created slot is physical.
+        </para>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+    </para>
     </listitem>
   </varlistentry>
 
-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Reply via email to