1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

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 eeca4cd35e, 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'.
This commit is contained in:
Andres Freund
2014-06-05 16:29:20 +02:00
parent e0cb4aa89d
commit f0c108560b
11 changed files with 50 additions and 50 deletions

View File

@@ -16609,14 +16609,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_create_physical_replication_slot</primary>
</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>
(<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>
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
linkend="protocol-replication">. Corresponds to the walsender protocol
command <literal>CREATE_REPLICATION_SLOT ... PHYSICAL</literal>.
@@ -16627,14 +16627,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_drop_replication_slot</primary>
</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>
<type>void</type>
</entry>
<entry>
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</>.
</entry>
</row>
@@ -16644,14 +16644,14 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_create_logical_replication_slot</primary>
</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>
(<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>
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
effect as the replication protocol command
<literal>CREATE REPLICATION SLOT ... LOGICAL</literal>.
@@ -16663,16 +16663,16 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_logical_slot_get_changes</primary>
</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>
(<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>text</type>)
</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
<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
those transactions which commit prior to the specified LSN. If
<parameter>upto_nchanges</parameter> is non-NULL, decoding will
@@ -16688,7 +16688,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_logical_slot_peek_changes</primary>
</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>
(<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());
<indexterm>
<primary>pg_logical_slot_get_binary_changes</primary>
</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>
(<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());
<indexterm>
<primary>pg_logical_slot_peek_binary_changes</primary>
</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>
(<parameter>location</parameter> <type>pg_lsn</type>, <parameter>xid</parameter> <type>xid</type>, <parameter>data</parameter> <type>bytea</type>)

View File

@@ -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:
<programlisting>
postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
slotname | xlog_position
slot_name | xlog_position
-------------+---------------
node_a_slot |
@@ -939,13 +939,13 @@ postgres=# SELECT * FROM pg_replication_slots;
node_a_slot | physical | | | f | |
(1 row)
</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</>.
Here is a simple example:
<programlisting>
standby_mode = 'on'
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>
</para>
</sect3>

View File

@@ -54,7 +54,7 @@
<programlisting>
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');
slotname | xlog_position
slot_name | xlog_position
-----------------+---------------
regression_slot | 0/16B1970
(1 row)
@@ -256,9 +256,9 @@ CTRL-C
<sect1 id="logicaldecoding-walsender">
<title>Streaming Replication Protocol Interface</title>
<para>
The <literal>CREATE_REPLICATION_SLOT slotname LOGICAL
options</literal>, <literal>DROP_REPLICATION_SLOT slotname</literal>
and <literal>START_REPLICATION SLOT slotname LOGICAL options</literal>
The <literal>CREATE_REPLICATION_SLOT slot_name LOGICAL
options</literal>, <literal>DROP_REPLICATION_SLOT slot_name</literal>
and <literal>START_REPLICATION SLOT slot_name LOGICAL options</literal>
commands can be used to create, drop and stream changes from a replication
slot respectively. These commands are only available over a replication
connection; they cannot be used via SQL.

View File

@@ -1428,7 +1428,7 @@ The commands accepted in walsender mode are:
</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>
<para>
Create a physical or logical replication
@@ -1437,7 +1437,7 @@ The commands accepted in walsender mode are:
</para>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">slotname</></term>
<term><replaceable class="parameter">slot_name</></term>
<listitem>
<para>
The name of the slot to create. Must be a valid replication slot
@@ -1460,7 +1460,7 @@ The commands accepted in walsender mode are:
</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>
<para>
Instructs server to start streaming WAL, starting at
@@ -1506,7 +1506,7 @@ The commands accepted in walsender mode are:
<para>
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 -
and if <varname>hot_standby_feedback</> is on which transactions -
are still needed by the standby.
@@ -1788,7 +1788,7 @@ The commands accepted in walsender mode are:
</listitem>
</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>
<para>
Instructs server to start streaming WAL for logical replication, starting
@@ -1810,7 +1810,7 @@ The commands accepted in walsender mode are:
<variablelist>
<varlistentry>
<term><literal>SLOT</literal> <replaceable class="parameter">slotname</></term>
<term><literal>SLOT</literal> <replaceable class="parameter">slot_name</></term>
<listitem>
<para>
The name of the slot to stream changes from. This parameter is required,
@@ -1850,7 +1850,7 @@ The commands accepted in walsender mode are:
</varlistentry>
<varlistentry>
<term>DROP_REPLICATION_SLOT <replaceable class="parameter">slotname</></term>
<term>DROP_REPLICATION_SLOT <replaceable class="parameter">slot_name</></term>
<listitem>
<para>
Drops a replication slot, freeing any reserved server-side resources. If
@@ -1858,7 +1858,7 @@ The commands accepted in walsender mode are:
</para>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">slotname</></term>
<term><replaceable class="parameter">slot_name</></term>
<listitem>
<para>
The name of the slot to drop.

View File

@@ -370,10 +370,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
</para>
</listitem>
</varlistentry>
<varlistentry id="primary-slotname" xreflabel="primary_slotname">
<term><varname>primary_slotname</varname> (<type>string</type>)
<varlistentry id="primary-slot-name" xreflabel="primary_slot_name">
<term><varname>primary_slot_name</varname> (<type>string</type>)
<indexterm>
<primary><varname>primary_slotname</> recovery parameter</primary>
<primary><varname>primary_slot_name</> recovery parameter</primary>
</indexterm>
</term>
<listitem>