doc_edit_pg_create_replication_slot.patch
text/x-patch
Filename: doc_edit_pg_create_replication_slot.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| doc/src/sgml/func.sgml | 6 | 4 |
| src/backend/replication/slotfuncs.c | 2 | 2 |
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index edc9be92a6..697146468c 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -19186,7 +19186,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
<indexterm>
<primary>pg_create_physical_replication_slot</primary>
</indexterm>
- <literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type> <optional>, <parameter>immediately_reserve</parameter> <type>boolean</type>, <parameter>temporary</parameter> <type>boolean</type></optional>)</function></literal>
+ <literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type> <optional>, <parameter>initialize</parameter> <type>boolean</type>, <parameter>temporary</parameter> <type>boolean</type></optional>)</function></literal>
</entry>
<entry>
(<parameter>slot_name</parameter> <type>name</type>, <parameter>lsn</parameter> <type>pg_lsn</type>)
@@ -19194,9 +19194,11 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
<entry>
Creates a new physical replication slot named
<parameter>slot_name</parameter>. The optional second parameter,
- when <literal>true</literal>, specifies that the <acronym>LSN</acronym> for this
- replication slot be reserved immediately; otherwise
- the <acronym>LSN</acronym> is reserved on first connection from a streaming
+ when <literal>true</literal>, specifies that the <literal>restart_lsn</literal>
+ for this replication slot be initialized immediately with REDO
+ <acronym>LSN</acronym> of the last checkpoint; otherwise it is
+ initialized on first connection from a streaming
+
replication client. Streaming changes from a physical slot is only
possible with the streaming-replication protocol —
see <xref linkend="protocol-replication"/>. The optional third
diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index 2806e1076c..703b61768b 100644
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -43,7 +43,7 @@ Datum
pg_create_physical_replication_slot(PG_FUNCTION_ARGS)
{
Name name = PG_GETARG_NAME(0);
- bool immediately_reserve = PG_GETARG_BOOL(1);
+ bool initialize = PG_GETARG_BOOL(1);
bool temporary = PG_GETARG_BOOL(2);
Datum values[2];
bool nulls[2];
@@ -67,7 +67,7 @@ pg_create_physical_replication_slot(PG_FUNCTION_ARGS)
values[0] = NameGetDatum(&MyReplicationSlot->data.name);
nulls[0] = false;
- if (immediately_reserve)
+ if (initialize)
{
/* Reserve WAL as the user asked for it */
ReplicationSlotReserveWal();