Skip to content

Commit ef92a34

Browse files
xzillaCommitfest Bot
authored and
Commitfest Bot
committed
Distinguish between streaming replication and physical
Our docs still use the term "streaming replication" in places where they really mean physical replication. These changes try to clarify the language around streaming replication, physical replication, and logical replication. In particular we should avoid suggesting that "streaming" and "logical" are opposites or alternatives.
1 parent a675149 commit ef92a34

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

doc/src/sgml/config.sgml

+15-14
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ include_dir 'conf.d'
20522052
<para>
20532053
Specifies the maximum amount of memory to be used by logical decoding,
20542054
before some of the decoded changes are written to local disk. This
2055-
limits the amount of memory used by logical streaming replication
2055+
limits the amount of memory used by streaming logical replication
20562056
connections. It defaults to 64 megabytes (<literal>64MB</literal>).
20572057
Since each replication connection only uses a single buffer of this size,
20582058
and an installation normally doesn't have many such connections
@@ -3769,7 +3769,7 @@ include_dir 'conf.d'
37693769
difference between the two modes, but when set to <literal>always</literal>
37703770
the WAL archiver is enabled also during archive recovery or standby
37713771
mode. In <literal>always</literal> mode, all files restored from the archive
3772-
or streamed with streaming replication will be archived (again). See
3772+
or streamed with streaming physical replication will be archived (again). See
37733773
<xref linkend="continuous-archiving-in-standby"/> for details.
37743774
</para>
37753775
<para>
@@ -3875,7 +3875,7 @@ include_dir 'conf.d'
38753875
full files. Therefore, it is unwise to use a very short
38763876
<varname>archive_timeout</varname> &mdash; it will bloat your archive
38773877
storage. <varname>archive_timeout</varname> settings of a minute or so are
3878-
usually reasonable. You should consider using streaming replication,
3878+
usually reasonable. You should consider using streaming physical replication,
38793879
instead of archiving, if you want data to be copied off the primary
38803880
server more quickly than that.
38813881
If this value is specified without units, it is taken as seconds.
@@ -3900,7 +3900,7 @@ include_dir 'conf.d'
39003900

39013901
<para>
39023902
This section describes the settings that apply to recovery in general,
3903-
affecting crash recovery, streaming replication and archive-based
3903+
affecting crash recovery, streaming physical replication and archive-based
39043904
replication.
39053905
</para>
39063906

@@ -4010,7 +4010,7 @@ include_dir 'conf.d'
40104010
<para>
40114011
The local shell command to execute to retrieve an archived segment of
40124012
the WAL file series. This parameter is required for archive recovery,
4013-
but optional for streaming replication.
4013+
but optional for streaming physical replication.
40144014
Any <literal>%f</literal> in the string is
40154015
replaced by the name of the file to retrieve from the archive,
40164016
and any <literal>%p</literal> is replaced by the copy destination path name
@@ -4436,15 +4436,16 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
44364436
<title>Replication</title>
44374437

44384438
<para>
4439-
These settings control the behavior of the built-in
4440-
<firstterm>streaming replication</firstterm> feature (see
4441-
<xref linkend="streaming-replication"/>), and the built-in
4442-
<firstterm>logical replication</firstterm> feature (see
4439+
These settings control the behavior of
4440+
<firstterm>streaming replication</firstterm>,
4441+
both <firstterm>physical replication</firstterm>
4442+
(see <xref linkend="streaming-replication"/>) and
4443+
<firstterm>logical replication</firstterm> (see
44434444
<xref linkend="logical-replication"/>).
44444445
</para>
44454446

44464447
<para>
4447-
For <emphasis>streaming replication</emphasis>, servers will be either a
4448+
For <emphasis>physical replication</emphasis>, servers will be either a
44484449
primary or a standby server. Primaries can send data, while standbys
44494450
are always receivers of replicated data. When cascading replication
44504451
(see <xref linkend="cascading-replication"/>) is used, standby servers
@@ -4873,7 +4874,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
48734874
These settings control the behavior of a
48744875
<link linkend="standby-server-operation">standby server</link>
48754876
that is
4876-
to receive replication data. Their values on the primary server
4877+
to receive physical replication data. Their values on the primary server
48774878
are irrelevant.
48784879
</para>
48794880

@@ -5011,7 +5012,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
50115012
conflict with about-to-be-applied WAL entries, as described in
50125013
<xref linkend="hot-standby-conflict"/>.
50135014
<varname>max_standby_streaming_delay</varname> applies when WAL data is
5014-
being received via streaming replication.
5015+
being received via streaming physical replication.
50155016
If this value is specified without units, it is taken as milliseconds.
50165017
The default is 30 seconds.
50175018
A value of -1 allows the standby to wait forever for conflicting
@@ -5147,7 +5148,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
51475148
<listitem>
51485149
<para>
51495150
Specifies how long the standby server should wait when WAL data is not
5150-
available from any sources (streaming replication,
5151+
available from any sources (streaming physical replication,
51515152
local <filename>pg_wal</filename> or WAL archive) before trying
51525153
again to retrieve WAL data.
51535154
If this value is specified without units, it is taken as milliseconds.
@@ -5224,7 +5225,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
52245225
<filename>pg_wal</filename> directory.
52255226
</para>
52265227
<para>
5227-
This parameter is intended for use with streaming replication deployments;
5228+
This parameter is intended for use with streaming physical replication deployments;
52285229
however, if the parameter is specified it will be honored in all cases
52295230
except crash recovery.
52305231

doc/src/sgml/high-availability.sgml

+10-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protocol to make nodes agree on a serializable transactional order.
151151
</para>
152152
<para>
153153
A standby server can be implemented using file-based log shipping
154-
(<xref linkend="warm-standby"/>) or streaming replication (see
154+
(<xref linkend="warm-standby"/>) or streaming physical replication (see
155155
<xref linkend="streaming-replication"/>), or a combination of both. For
156156
information on hot standby, see <xref linkend="hot-standby"/>.
157157
</para>
@@ -628,7 +628,7 @@ protocol to make nodes agree on a serializable transactional order.
628628
In standby mode, the server continuously applies WAL received from the
629629
primary server. The standby server can read WAL from a WAL archive
630630
(see <xref linkend="guc-restore-command"/>) or directly from the primary
631-
over a TCP connection (streaming replication). The standby server will
631+
over a TCP connection (streaming physical replication). The standby server will
632632
also attempt to restore any WAL found in the standby cluster's
633633
<filename>pg_wal</filename> directory. That typically happens after a server
634634
restart, when the standby replays again WAL that was streamed from the
@@ -772,6 +772,14 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r'
772772
generated, without waiting for the WAL file to be filled.
773773
</para>
774774

775+
<note>
776+
<para>
777+
This discussion of streaming replication assumes physical replication.
778+
Although you could treat a logical replication subscriber as a warm standby,
779+
it would require some differences to what is described here.
780+
</para>
781+
</note>
782+
775783
<para>
776784
Streaming replication is asynchronous by default
777785
(see <xref linkend="synchronous-replication"/>), in which case there is

doc/src/sgml/logical-replication.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<para>
77
Logical replication is a method of replicating data objects and their
88
changes, based upon their replication identity (usually a primary key). We
9-
use the term logical in contrast to physical replication, which uses exact
9+
use the term logical replication in contrast to physical replication, which uses exact
1010
block addresses and byte-by-byte replication. PostgreSQL supports both
1111
mechanisms concurrently, see <xref linkend="high-availability"/>. Logical
1212
replication allows fine-grained control over both data replication and
@@ -2272,8 +2272,8 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
22722272
<title>Monitoring</title>
22732273

22742274
<para>
2275-
Because logical replication is based on a similar architecture as
2276-
<link linkend="streaming-replication">physical streaming replication</link>,
2275+
Because streaming logical replication is based on a similar architecture as
2276+
<link linkend="streaming-replication">streaming physical replication</link>,
22772277
the monitoring on a publication node is similar to monitoring of a
22782278
physical replication primary
22792279
(see <xref linkend="streaming-replication-monitoring"/>).

doc/src/sgml/logicaldecoding.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
275275
</para>
276276

277277
<note>
278-
<para><productname>PostgreSQL</productname> also has streaming replication slots
279-
(see <xref linkend="streaming-replication"/>), but they are used somewhat
280-
differently there.
278+
<para><productname>PostgreSQL</productname> can also use streaming replication slots
279+
to maintain a standby server (see <xref linkend="streaming-replication"/>), but
280+
typically those use physical replication, not logical.
281281
</para>
282282
</note>
283283

0 commit comments

Comments
 (0)