Commit f0c10856 authored by Andres Freund's avatar Andres Freund

Consistently spell a replication slot's name as slot_name.

Previously there's been a mix between 'slotname' and 'slot_name'. It's
not nice to be unneccessarily inconsistent in a new feature. As a post
beta1 initdb now is required in the wake of eeca4cd3, fix the
inconsistencies.
Most the changes won't affect usage of replication slots because the
majority of changes is around function parameter names. The prominent
exception to that is that the recovery.conf parameter
'primary_slotname' is now named 'primary_slot_name'.
parent e0cb4aa8
...@@ -16609,14 +16609,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16609,14 +16609,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_create_physical_replication_slot</primary> <primary>pg_create_physical_replication_slot</primary>
</indexterm> </indexterm>
<literal><function>pg_create_physical_replication_slot(<parameter>slotname</parameter> <type>name</type>)</function></literal> <literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type>)</function></literal>
</entry> </entry>
<entry> <entry>
(<parameter>slotname</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>) (<parameter>slot_name</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
</entry> </entry>
<entry> <entry>
Creates a new physical replication slot named Creates a new physical replication slot named
<parameter>slotname</parameter>. Streaming changes from a physical slot <parameter>slot_name</parameter>. Streaming changes from a physical slot
is only possible with the walsender protocol - see <xref is only possible with the walsender protocol - see <xref
linkend="protocol-replication">. Corresponds to the walsender protocol linkend="protocol-replication">. Corresponds to the walsender protocol
command <literal>CREATE_REPLICATION_SLOT ... PHYSICAL</literal>. command <literal>CREATE_REPLICATION_SLOT ... PHYSICAL</literal>.
...@@ -16627,14 +16627,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16627,14 +16627,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_drop_replication_slot</primary> <primary>pg_drop_replication_slot</primary>
</indexterm> </indexterm>
<literal><function>pg_drop_replication_slot(<parameter>slotname</parameter> <type>name</type>)</function></literal> <literal><function>pg_drop_replication_slot(<parameter>slot_name</parameter> <type>name</type>)</function></literal>
</entry> </entry>
<entry> <entry>
<type>void</type> <type>void</type>
</entry> </entry>
<entry> <entry>
Drops the physical or logical replication slot Drops the physical or logical replication slot
named <parameter>slotname</parameter>. Same as walsender protocol named <parameter>slot_name</parameter>. Same as walsender protocol
command <literal>DROP_REPLICATION_SLOT</>. command <literal>DROP_REPLICATION_SLOT</>.
</entry> </entry>
</row> </row>
...@@ -16644,14 +16644,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16644,14 +16644,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_create_logical_replication_slot</primary> <primary>pg_create_logical_replication_slot</primary>
</indexterm> </indexterm>
<literal><function>pg_create_logical_replication_slot(<parameter>slotname</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type>)</function></literal> <literal><function>pg_create_logical_replication_slot(<parameter>slot_name</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type>)</function></literal>
</entry> </entry>
<entry> <entry>
(<parameter>slotname</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>) (<parameter>slot_name</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
</entry> </entry>
<entry> <entry>
Creates a new logical (decoding) replication slot named Creates a new logical (decoding) replication slot named
<parameter>slotname</parameter> using the output plugin <parameter>slot_name</parameter> using the output plugin
<parameter>plugin</parameter>. A call to this function has the same <parameter>plugin</parameter>. A call to this function has the same
effect as the replication protocol command effect as the replication protocol command
<literal>CREATE REPLICATION SLOT ... LOGICAL</literal>. <literal>CREATE REPLICATION SLOT ... LOGICAL</literal>.
...@@ -16663,16 +16663,16 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16663,16 +16663,16 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_logical_slot_get_changes</primary> <primary>pg_logical_slot_get_changes</primary>
</indexterm> </indexterm>
<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> <literal><function>pg_logical_slot_get_changes(<parameter>slot_name</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>
</entry> </entry>
<entry> <entry>
(<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>) (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>)
</entry> </entry>
<entry> <entry>
Returns changes in the slot <parameter>slotname</parameter>, starting Returns changes in the slot <parameter>slot_name</parameter>, starting
from the point at which since changes have been consumed last. If from the point at which since changes have been consumed last. If
<parameter>upto_lsn</> and <parameter>upto_nchanges</> are NULL, <parameter>upto_lsn</> and <parameter>upto_nchanges</> are NULL,
logical decoding will continue until end of WAL. If logical decoding will continue until end of WAL. If
<parameter>upto_lsn</> is non-NULL, decoding will include only <parameter>upto_lsn</> is non-NULL, decoding will include only
those transactions which commit prior to the specified LSN. If those transactions which commit prior to the specified LSN. If
<parameter>upto_nchanges</parameter> is non-NULL, decoding will <parameter>upto_nchanges</parameter> is non-NULL, decoding will
...@@ -16688,7 +16688,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16688,7 +16688,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_logical_slot_peek_changes</primary> <primary>pg_logical_slot_peek_changes</primary>
</indexterm> </indexterm>
<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> <literal><function>pg_logical_slot_peek_changes(<parameter>slot_name</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>
</entry> </entry>
<entry> <entry>
(<parameter>location</parameter> <type>text</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>) (<parameter>location</parameter> <type>text</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>)
...@@ -16706,7 +16706,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16706,7 +16706,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_logical_slot_get_binary_changes</primary> <primary>pg_logical_slot_get_binary_changes</primary>
</indexterm> </indexterm>
<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> <literal><function>pg_logical_slot_get_binary_changes(<parameter>slot_name</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>
</entry> </entry>
<entry> <entry>
(<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>) (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>)
...@@ -16723,7 +16723,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); ...@@ -16723,7 +16723,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm> <indexterm>
<primary>pg_logical_slot_peek_binary_changes</primary> <primary>pg_logical_slot_peek_binary_changes</primary>
</indexterm> </indexterm>
<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> <literal><function>pg_logical_slot_peek_binary_changes(<parameter>slot_name</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>
</entry> </entry>
<entry> <entry>
(<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>) (<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>)
......
...@@ -929,7 +929,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' ...@@ -929,7 +929,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can create a replication slot like this: You can create a replication slot like this:
<programlisting> <programlisting>
postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot'); postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
slotname | xlog_position slot_name | xlog_position
-------------+--------------- -------------+---------------
node_a_slot | node_a_slot |
...@@ -939,13 +939,13 @@ postgres=# SELECT * FROM pg_replication_slots; ...@@ -939,13 +939,13 @@ postgres=# SELECT * FROM pg_replication_slots;
node_a_slot | physical | | | f | | node_a_slot | physical | | | f | |
(1 row) (1 row)
</programlisting> </programlisting>
To configure the standby to use this slot, <varname>primary_slotname</> To configure the standby to use this slot, <varname>primary_slot_name</>
should be configured in the standby's <filename>recovery.conf</>. should be configured in the standby's <filename>recovery.conf</>.
Here is a simple example: Here is a simple example:
<programlisting> <programlisting>
standby_mode = 'on' standby_mode = 'on'
primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
primary_slotname = 'node_a_slot' primary_slot_name = 'node_a_slot'
</programlisting> </programlisting>
</para> </para>
</sect3> </sect3>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<programlisting> <programlisting>
postgres=# -- Create a slot named 'regression_slot' using the output plugin 'test_decoding' postgres=# -- Create a slot named 'regression_slot' using the output plugin 'test_decoding'
postgres=# SELECT * FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding'); postgres=# SELECT * FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
slotname | xlog_position slot_name | xlog_position
-----------------+--------------- -----------------+---------------
regression_slot | 0/16B1970 regression_slot | 0/16B1970
(1 row) (1 row)
...@@ -256,9 +256,9 @@ CTRL-C ...@@ -256,9 +256,9 @@ CTRL-C
<sect1 id="logicaldecoding-walsender"> <sect1 id="logicaldecoding-walsender">
<title>Streaming Replication Protocol Interface</title> <title>Streaming Replication Protocol Interface</title>
<para> <para>
The <literal>CREATE_REPLICATION_SLOT slotname LOGICAL The <literal>CREATE_REPLICATION_SLOT slot_name LOGICAL
options</literal>, <literal>DROP_REPLICATION_SLOT slotname</literal> options</literal>, <literal>DROP_REPLICATION_SLOT slot_name</literal>
and <literal>START_REPLICATION SLOT slotname LOGICAL options</literal> and <literal>START_REPLICATION SLOT slot_name LOGICAL options</literal>
commands can be used to create, drop and stream changes from a replication commands can be used to create, drop and stream changes from a replication
slot respectively. These commands are only available over a replication slot respectively. These commands are only available over a replication
connection; they cannot be used via SQL. connection; they cannot be used via SQL.
......
...@@ -1428,7 +1428,7 @@ The commands accepted in walsender mode are: ...@@ -1428,7 +1428,7 @@ The commands accepted in walsender mode are:
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>CREATE_REPLICATION_SLOT <replaceable class="parameter">slotname</> { <literal>PHYSICAL</> | <literal>LOGICAL</> <replaceable class="parameter">output_plugin</> } <indexterm><primary>CREATE_REPLICATION_SLOT</primary></indexterm></term> <term>CREATE_REPLICATION_SLOT <replaceable class="parameter">slot_name</> { <literal>PHYSICAL</> | <literal>LOGICAL</> <replaceable class="parameter">output_plugin</> } <indexterm><primary>CREATE_REPLICATION_SLOT</primary></indexterm></term>
<listitem> <listitem>
<para> <para>
Create a physical or logical replication Create a physical or logical replication
...@@ -1437,7 +1437,7 @@ The commands accepted in walsender mode are: ...@@ -1437,7 +1437,7 @@ The commands accepted in walsender mode are:
</para> </para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">slotname</></term> <term><replaceable class="parameter">slot_name</></term>
<listitem> <listitem>
<para> <para>
The name of the slot to create. Must be a valid replication slot The name of the slot to create. Must be a valid replication slot
...@@ -1460,7 +1460,7 @@ The commands accepted in walsender mode are: ...@@ -1460,7 +1460,7 @@ The commands accepted in walsender mode are:
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>START_REPLICATION [<literal>SLOT</literal> <replaceable class="parameter">slotname</>] [<literal>PHYSICAL</literal>] <replaceable class="parameter">XXX/XXX</> [<literal>TIMELINE</literal> <replaceable class="parameter">tli</>]</term> <term>START_REPLICATION [<literal>SLOT</literal> <replaceable class="parameter">slot_name</>] [<literal>PHYSICAL</literal>] <replaceable class="parameter">XXX/XXX</> [<literal>TIMELINE</literal> <replaceable class="parameter">tli</>]</term>
<listitem> <listitem>
<para> <para>
Instructs server to start streaming WAL, starting at Instructs server to start streaming WAL, starting at
...@@ -1506,7 +1506,7 @@ The commands accepted in walsender mode are: ...@@ -1506,7 +1506,7 @@ The commands accepted in walsender mode are:
<para> <para>
If a slot's name is provided If a slot's name is provided
via <replaceable class="parameter">slotname</>, it will be updated via <replaceable class="parameter">slot_name</>, it will be updated
as replication progresses so that the server knows which WAL segments - as replication progresses so that the server knows which WAL segments -
and if <varname>hot_standby_feedback</> is on which transactions - and if <varname>hot_standby_feedback</> is on which transactions -
are still needed by the standby. are still needed by the standby.
...@@ -1788,7 +1788,7 @@ The commands accepted in walsender mode are: ...@@ -1788,7 +1788,7 @@ The commands accepted in walsender mode are:
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>START_REPLICATION <literal>SLOT</literal> <replaceable class="parameter">slotname</> <literal>LOGICAL</literal> <replaceable class="parameter">XXX/XXX</> [ ( <replaceable>option_name</replaceable> [<replaceable>option_value</replaceable>] [, ... ] ) ]</term> <term>START_REPLICATION <literal>SLOT</literal> <replaceable class="parameter">slot_name</> <literal>LOGICAL</literal> <replaceable class="parameter">XXX/XXX</> [ ( <replaceable>option_name</replaceable> [<replaceable>option_value</replaceable>] [, ... ] ) ]</term>
<listitem> <listitem>
<para> <para>
Instructs server to start streaming WAL for logical replication, starting Instructs server to start streaming WAL for logical replication, starting
...@@ -1810,7 +1810,7 @@ The commands accepted in walsender mode are: ...@@ -1810,7 +1810,7 @@ The commands accepted in walsender mode are:
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><literal>SLOT</literal> <replaceable class="parameter">slotname</></term> <term><literal>SLOT</literal> <replaceable class="parameter">slot_name</></term>
<listitem> <listitem>
<para> <para>
The name of the slot to stream changes from. This parameter is required, The name of the slot to stream changes from. This parameter is required,
...@@ -1850,7 +1850,7 @@ The commands accepted in walsender mode are: ...@@ -1850,7 +1850,7 @@ The commands accepted in walsender mode are:
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>DROP_REPLICATION_SLOT <replaceable class="parameter">slotname</></term> <term>DROP_REPLICATION_SLOT <replaceable class="parameter">slot_name</></term>
<listitem> <listitem>
<para> <para>
Drops a replication slot, freeing any reserved server-side resources. If Drops a replication slot, freeing any reserved server-side resources. If
...@@ -1858,7 +1858,7 @@ The commands accepted in walsender mode are: ...@@ -1858,7 +1858,7 @@ The commands accepted in walsender mode are:
</para> </para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">slotname</></term> <term><replaceable class="parameter">slot_name</></term>
<listitem> <listitem>
<para> <para>
The name of the slot to drop. The name of the slot to drop.
......
...@@ -370,10 +370,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows ...@@ -370,10 +370,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="primary-slotname" xreflabel="primary_slotname"> <varlistentry id="primary-slot-name" xreflabel="primary_slot_name">
<term><varname>primary_slotname</varname> (<type>string</type>) <term><varname>primary_slot_name</varname> (<type>string</type>)
<indexterm> <indexterm>
<primary><varname>primary_slotname</> recovery parameter</primary> <primary><varname>primary_slot_name</> recovery parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
# removal on the upstream node. This setting has no effect if primary_conninfo # removal on the upstream node. This setting has no effect if primary_conninfo
# is not set. # is not set.
# #
#primary_slotname = '' #primary_slot_name = ''
# #
# By default, a standby server keeps restoring XLOG records from the # By default, a standby server keeps restoring XLOG records from the
# primary indefinitely. If you want to stop the standby mode, finish recovery # primary indefinitely. If you want to stop the standby mode, finish recovery
......
...@@ -5221,12 +5221,12 @@ readRecoveryCommandFile(void) ...@@ -5221,12 +5221,12 @@ readRecoveryCommandFile(void)
(errmsg_internal("primary_conninfo = '%s'", (errmsg_internal("primary_conninfo = '%s'",
PrimaryConnInfo))); PrimaryConnInfo)));
} }
else if (strcmp(item->name, "primary_slotname") == 0) else if (strcmp(item->name, "primary_slot_name") == 0)
{ {
ReplicationSlotValidateName(item->value, ERROR); ReplicationSlotValidateName(item->value, ERROR);
PrimarySlotName = pstrdup(item->value); PrimarySlotName = pstrdup(item->value);
ereport(DEBUG2, ereport(DEBUG2,
(errmsg_internal("primary_slotname = '%s'", (errmsg_internal("primary_slot_name = '%s'",
PrimarySlotName))); PrimarySlotName)));
} }
else if (strcmp(item->name, "trigger_file") == 0) else if (strcmp(item->name, "trigger_file") == 0)
......
...@@ -850,7 +850,7 @@ CREATE OR REPLACE FUNCTION ...@@ -850,7 +850,7 @@ CREATE OR REPLACE FUNCTION
RETURNS SETOF record LANGUAGE internal STABLE ROWS 100 AS 'jsonb_to_recordset'; RETURNS SETOF record LANGUAGE internal STABLE ROWS 100 AS 'jsonb_to_recordset';
CREATE OR REPLACE FUNCTION pg_logical_slot_get_changes( CREATE OR REPLACE FUNCTION pg_logical_slot_get_changes(
IN slotname name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}', IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}',
OUT location pg_lsn, OUT xid xid, OUT data text) OUT location pg_lsn, OUT xid xid, OUT data text)
RETURNS SETOF RECORD RETURNS SETOF RECORD
LANGUAGE INTERNAL LANGUAGE INTERNAL
...@@ -858,7 +858,7 @@ VOLATILE ROWS 1000 COST 1000 ...@@ -858,7 +858,7 @@ VOLATILE ROWS 1000 COST 1000
AS 'pg_logical_slot_get_changes'; AS 'pg_logical_slot_get_changes';
CREATE OR REPLACE FUNCTION pg_logical_slot_peek_changes( CREATE OR REPLACE FUNCTION pg_logical_slot_peek_changes(
IN slotname name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}', IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}',
OUT location pg_lsn, OUT xid xid, OUT data text) OUT location pg_lsn, OUT xid xid, OUT data text)
RETURNS SETOF RECORD RETURNS SETOF RECORD
LANGUAGE INTERNAL LANGUAGE INTERNAL
...@@ -866,7 +866,7 @@ VOLATILE ROWS 1000 COST 1000 ...@@ -866,7 +866,7 @@ VOLATILE ROWS 1000 COST 1000
AS 'pg_logical_slot_peek_changes'; AS 'pg_logical_slot_peek_changes';
CREATE OR REPLACE FUNCTION pg_logical_slot_get_binary_changes( CREATE OR REPLACE FUNCTION pg_logical_slot_get_binary_changes(
IN slotname name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}', IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}',
OUT location pg_lsn, OUT xid xid, OUT data bytea) OUT location pg_lsn, OUT xid xid, OUT data bytea)
RETURNS SETOF RECORD RETURNS SETOF RECORD
LANGUAGE INTERNAL LANGUAGE INTERNAL
...@@ -874,7 +874,7 @@ VOLATILE ROWS 1000 COST 1000 ...@@ -874,7 +874,7 @@ VOLATILE ROWS 1000 COST 1000
AS 'pg_logical_slot_get_binary_changes'; AS 'pg_logical_slot_get_binary_changes';
CREATE OR REPLACE FUNCTION pg_logical_slot_peek_binary_changes( CREATE OR REPLACE FUNCTION pg_logical_slot_peek_binary_changes(
IN slotname name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}', IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC options text[] DEFAULT '{}',
OUT location pg_lsn, OUT xid xid, OUT data bytea) OUT location pg_lsn, OUT xid xid, OUT data bytea)
RETURNS SETOF RECORD RETURNS SETOF RECORD
LANGUAGE INTERNAL LANGUAGE INTERNAL
......
...@@ -89,11 +89,11 @@ usage(void) ...@@ -89,11 +89,11 @@ usage(void)
printf(_(" -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"), plugin); printf(_(" -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"), plugin);
printf(_(" -s, --status-interval=SECS\n" printf(_(" -s, --status-interval=SECS\n"
" time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000)); " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
printf(_(" -S, --slot=SLOT use existing replication slot SLOT instead of starting a new one\n")); printf(_(" -S, --slot=SLOT name of the logical replication slot\n"));
printf(_("\nAction to be performed:\n")); printf(_("\nAction to be performed:\n"));
printf(_(" --create create a new replication slot (for the slotname see --slot)\n")); printf(_(" --create create a new replication slot (for the slot's name see --slot)\n"));
printf(_(" --start start streaming in a replication slot (for the slotname see --slot)\n")); printf(_(" --start start streaming in a replication slot (for the slot's name see --slot)\n"));
printf(_(" --drop drop the replication slot (for the slotname see --slot)\n")); printf(_(" --drop drop the replication slot (for the slot's name see --slot)\n"));
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n")); printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
} }
......
...@@ -53,6 +53,6 @@ ...@@ -53,6 +53,6 @@
*/ */
/* yyyymmddN */ /* yyyymmddN */
#define CATALOG_VERSION_NO 201406041 #define CATALOG_VERSION_NO 201406051
#endif #endif
...@@ -4960,21 +4960,21 @@ DATA(insert OID = 3473 ( spg_range_quad_leaf_consistent PGNSP PGUID 12 1 0 0 0 ...@@ -4960,21 +4960,21 @@ DATA(insert OID = 3473 ( spg_range_quad_leaf_consistent PGNSP PGUID 12 1 0 0 0
DESCR("SP-GiST support for quad tree over range"); DESCR("SP-GiST support for quad tree over range");
/* replication slots */ /* replication slots */
DATA(insert OID = 3779 ( pg_create_physical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 1 0 2249 "19" "{19,19,3220}" "{i,o,o}" "{slotname,slotname,xlog_position}" _null_ pg_create_physical_replication_slot _null_ _null_ _null_ )); DATA(insert OID = 3779 ( pg_create_physical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 1 0 2249 "19" "{19,19,3220}" "{i,o,o}" "{slot_name,slot_name,xlog_position}" _null_ pg_create_physical_replication_slot _null_ _null_ _null_ ));
DESCR("create a physical replication slot"); DESCR("create a physical replication slot");
DATA(insert OID = 3780 ( pg_drop_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 1 0 2278 "19" _null_ _null_ _null_ _null_ pg_drop_replication_slot _null_ _null_ _null_ )); DATA(insert OID = 3780 ( pg_drop_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 1 0 2278 "19" _null_ _null_ _null_ _null_ pg_drop_replication_slot _null_ _null_ _null_ ));
DESCR("drop a replication slot"); DESCR("drop a replication slot");
DATA(insert OID = 3781 ( pg_get_replication_slots PGNSP PGUID 12 1 10 0 0 f f f f f t s 0 0 2249 "" "{19,19,25,26,16,28,28,3220}" "{o,o,o,o,o,o,o,o}" "{slot_name,plugin,slot_type,datoid,active,xmin,catalog_xmin,restart_lsn}" _null_ pg_get_replication_slots _null_ _null_ _null_ )); DATA(insert OID = 3781 ( pg_get_replication_slots PGNSP PGUID 12 1 10 0 0 f f f f f t s 0 0 2249 "" "{19,19,25,26,16,28,28,3220}" "{o,o,o,o,o,o,o,o}" "{slot_name,plugin,slot_type,datoid,active,xmin,catalog_xmin,restart_lsn}" _null_ pg_get_replication_slots _null_ _null_ _null_ ));
DESCR("information about replication slots currently in use"); DESCR("information about replication slots currently in use");
DATA(insert OID = 3786 ( pg_create_logical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 2 0 2249 "19 19" "{19,19,25,3220}" "{i,i,o,o}" "{slotname,plugin,slotname,xlog_position}" _null_ pg_create_logical_replication_slot _null_ _null_ _null_ )); DATA(insert OID = 3786 ( pg_create_logical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f f f v 2 0 2249 "19 19" "{19,19,25,3220}" "{i,i,o,o}" "{slot_name,plugin,slot_name,xlog_position}" _null_ pg_create_logical_replication_slot _null_ _null_ _null_ ));
DESCR("set up a logical replication slot"); DESCR("set up a logical replication slot");
DATA(insert OID = 3782 ( pg_logical_slot_get_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,25}" "{i,i,i,v,o,o,o}" "{slotname,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_get_changes _null_ _null_ _null_ )); DATA(insert OID = 3782 ( pg_logical_slot_get_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,25}" "{i,i,i,v,o,o,o}" "{slot_name,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_get_changes _null_ _null_ _null_ ));
DESCR("get changes from replication slot"); DESCR("get changes from replication slot");
DATA(insert OID = 3783 ( pg_logical_slot_get_binary_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,17}" "{i,i,i,v,o,o,o}" "{slotname,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_get_binary_changes _null_ _null_ _null_ )); DATA(insert OID = 3783 ( pg_logical_slot_get_binary_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,17}" "{i,i,i,v,o,o,o}" "{slot_name,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_get_binary_changes _null_ _null_ _null_ ));
DESCR("get binary changes from replication slot"); DESCR("get binary changes from replication slot");
DATA(insert OID = 3784 ( pg_logical_slot_peek_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,25}" "{i,i,i,v,o,o,o}" "{slotname,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_peek_changes _null_ _null_ _null_ )); DATA(insert OID = 3784 ( pg_logical_slot_peek_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,25}" "{i,i,i,v,o,o,o}" "{slot_name,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_peek_changes _null_ _null_ _null_ ));
DESCR("peek at changes from replication slot"); DESCR("peek at changes from replication slot");
DATA(insert OID = 3785 ( pg_logical_slot_peek_binary_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,17}" "{i,i,i,v,o,o,o}" "{slotname,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_peek_binary_changes _null_ _null_ _null_ )); DATA(insert OID = 3785 ( pg_logical_slot_peek_binary_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,17}" "{i,i,i,v,o,o,o}" "{slot_name,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ pg_logical_slot_peek_binary_changes _null_ _null_ _null_ ));
DESCR("peek at binary changes from replication slot"); DESCR("peek at binary changes from replication slot");
/* event triggers */ /* event triggers */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment