@@ -16437,9 +16437,108 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1643716437 command <literal>DROP_REPLICATION_SLOT</>.
1643816438 </entry>
1643916439 </row>
16440+
16441+ <row>
16442+ <entry>
16443+ <indexterm>
16444+ <primary>pg_create_logical_replication_slot</primary>
16445+ </indexterm>
16446+ <literal><function>pg_create_logical_replication_slot(<parameter>slotname</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type>)</function></literal>
16447+ </entry>
16448+ <entry>
16449+ (<parameter>slotname</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
16450+ </entry>
16451+ <entry>
16452+ Creates a new logical (decoding) replication slot named
16453+ <parameter>slotname</parameter> using the output plugin
16454+ <parameter>plugin</parameter>. A call to this function has the same
16455+ effect as the replication protocol command
16456+ <literal>CREATE REPLICATION SLOT ... LOGICAL</literal>.
16457+ </entry>
16458+ </row>
16459+
16460+ <row>
16461+ <entry>
16462+ <indexterm>
16463+ <primary>pg_logical_slot_get_changes</primary>
16464+ </indexterm>
16465+ <literal><function>pg_logical_slot_get_changes(<parameter>slotname</parameter> <type>name</type>, <parameter>upto_lsn</parameter> <type>pg_lsn</type>, <parameter>upto_nchanges</parameter> <type>int</type>, VARIADIC <parameter>options</parameter> <type>text[]</type>)</function></literal>
16466+ </entry>
16467+ <entry>
16468+ (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>)
16469+ </entry>
16470+ <entry>
16471+ Returns changes in the slot <parameter>slotname</parameter>, starting
16472+ from the point at which since changes have been consumed last. If
16473+ <parameter>upto_lsn</> and <parameter>upto_nchanges</> are NULL,
16474+ logical decoding will continue until end of WAL. If
16475+ <parameter>upto_lsn</> is non-NULL, decoding will include only
16476+ those transactions which commit prior to the specified LSN. If
16477+ <parameter>upto_nchanges</parameter> is non-NULL, decoding will
16478+ stop when the number of rows produced by decoding exceeds
16479+ the specified value. Note, however, that the actual number of
16480+ rows returned may be larger, since this limit is only checked after
16481+ adding the rows produced when decoding each new transaction commit.
16482+ </entry>
16483+ </row>
16484+
16485+ <row>
16486+ <entry>
16487+ <indexterm>
16488+ <primary>pg_logical_slot_peek_changes</primary>
16489+ </indexterm>
16490+ <literal><function>pg_logical_slot_peek_changes(<parameter>slotname</parameter> <type>name</type>, <parameter>upto_lsn</parameter> <type>pg_lsn</type>, <parameter>upto_nchanges</parameter> <type>int</type>, VARIADIC <parameter>options</parameter> <type>text[]</type>)</function></literal>
16491+ </entry>
16492+ <entry>
16493+ (<parameter>location</parameter> <type>text</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>)
16494+ </entry>
16495+ <entry>
16496+ Behaves just like
16497+ the <function>pg_logical_slot_get_changes()</function> function,
16498+ except that changes are not consumed; that is, they will be returned
16499+ again on future calls.
16500+ </entry>
16501+ </row>
16502+
16503+ <row>
16504+ <entry>
16505+ <indexterm>
16506+ <primary>pg_logical_slot_get_binary_changes</primary>
16507+ </indexterm>
16508+ <literal><function>pg_logical_slot_get_binary_changes(<parameter>slotname</parameter> <type>name</type>, <parameter>upto_lsn</parameter> <type>pg_lsn</type>, <parameter>upto_nchanges</parameter> <type>int</type>, VARIADIC <parameter>options</parameter> <type>text[]</type>)</function></literal>
16509+ </entry>
16510+ <entry>
16511+ (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>)
16512+ </entry>
16513+ <entry>
16514+ Behaves just like
16515+ the <function>pg_logical_slot_get_changes()</function> function,
16516+ except that changes are returned as <type>bytea</type>.
16517+ </entry>
16518+ </row>
16519+
16520+ <row>
16521+ <entry>
16522+ <indexterm>
16523+ <primary>pg_logical_slot_peek_binary_changes</primary>
16524+ </indexterm>
16525+ <literal><function>pg_logical_slot_peek_binary_changes(<parameter>slotname</parameter> <type>name</type>, <parameter>upto_lsn</parameter> <type>pg_lsn</type>, <parameter>upto_nchanges</parameter> <type>int</type>, VARIADIC <parameter>options</parameter> <type>text[]</type>)</function></literal>
16526+ </entry>
16527+ <entry>
16528+ (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>)
16529+ </entry>
16530+ <entry>
16531+ Behaves just like
16532+ the <function>pg_logical_slot_get_changes()</function> function,
16533+ except that changes are returned as <type>bytea</type> and that
16534+ changes are not consumed; that is, they will be returned again
16535+ on future calls.
16536+ </entry>
16537+ </row>
1644016538 </tbody>
1644116539 </tgroup>
1644216540 </table>
16541+
1644316542 </sect2>
1644416543
1644516544 <sect2 id="functions-admin-dbobject">
0 commit comments