summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2018-01-17 11:38:34 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2018-01-17 11:38:34 +0000
commit9c7d06d60680c7f00d931233873dee81fdb311c6 (patch)
tree7e2da1523af602caae0ef9d668d28b7aea1d6f70 /doc/src
parent585e166e46a1572b59eb9fdaffc2d4b785000f9e (diff)
Ability to advance replication slots
Ability to advance both physical and logical replication slots using a new user function pg_replication_slot_advance(). For logical advance that means records are consumed as fast as possible and changes are not given to output plugin for sending. Makes 2nd phase (after we reached SNAPBUILD_FULL_SNAPSHOT) of replication slot creation faster, especially when there are big transactions as the reorder buffer does not have to deal with data changes and does not have to spill to disk. Author: Petr Jelinek Reviewed-by: Simon Riggs
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2428434030b..487c7ff7507 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -19156,6 +19156,25 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
</row>
<row>
+ <entry>
+ <indexterm>
+ <primary>pg_replication_slot_advance</primary>
+ </indexterm>
+ <literal><function>pg_replication_slot_advance(<parameter>slot_name</parameter> <type>name</type>, <parameter>upto_lsn</parameter> <type>pg_lsn</type>)</function></literal>
+ </entry>
+ <entry>
+ (<parameter>slot_name</parameter> <type>name</type>, <parameter>end_lsn</parameter> <type>pg_lsn</type>)
+ <type>bool</type>
+ </entry>
+ <entry>
+ Advances the current confirmed position of a replication slot named
+ <parameter>slot_name</parameter>. The slot will not be moved backwards,
+ and it will not be moved beyond the current insert location. Returns
+ name of the slot and real position to which it was advanced to.
+ </entry>
+ </row>
+
+ <row>
<entry id="pg-replication-origin-create">
<indexterm>
<primary>pg_replication_origin_create</primary>