Skip to content

Commit e7e4a4a

Browse files
xzillaCommitfest Bot
authored andcommitted
Clarify usage of the term streaming replication.
The documentation uses this term where it is meant to refer specifically to physical replication rather than logical replication, which sets up a false dichotomy between logical and streaming replication. Original patch by Paul A. Jungwirth, with additional changes and updating by me.
1 parent b4cbc10 commit e7e4a4a

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

doc/src/sgml/config.sgml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ include_dir 'conf.d'
20752075
<para>
20762076
Specifies the maximum amount of memory to be used by logical decoding,
20772077
before some of the decoded changes are written to local disk. This
2078-
limits the amount of memory used by logical streaming replication
2078+
limits the amount of memory used by streaming logical replication
20792079
connections. It defaults to 64 megabytes (<literal>64MB</literal>).
20802080
Since each replication connection only uses a single buffer of this size,
20812081
and an installation normally doesn't have many such connections
@@ -3800,7 +3800,7 @@ include_dir 'conf.d'
38003800
difference between the two modes, but when set to <literal>always</literal>
38013801
the WAL archiver is enabled also during archive recovery or standby
38023802
mode. In <literal>always</literal> mode, all files restored from the archive
3803-
or streamed with streaming replication will be archived (again). See
3803+
or streamed with streaming physical replication will be archived (again). See
38043804
<xref linkend="continuous-archiving-in-standby"/> for details.
38053805
</para>
38063806
<para>
@@ -3906,7 +3906,7 @@ include_dir 'conf.d'
39063906
full files. Therefore, it is unwise to use a very short
39073907
<varname>archive_timeout</varname> &mdash; it will bloat your archive
39083908
storage. <varname>archive_timeout</varname> settings of a minute or so are
3909-
usually reasonable. You should consider using streaming replication,
3909+
usually reasonable. You should consider using streaming physical replication,
39103910
instead of archiving, if you want data to be copied off the primary
39113911
server more quickly than that.
39123912
If this value is specified without units, it is taken as seconds.
@@ -3931,7 +3931,7 @@ include_dir 'conf.d'
39313931

39323932
<para>
39333933
This section describes the settings that apply to recovery in general,
3934-
affecting crash recovery, streaming replication and archive-based
3934+
affecting crash recovery, streaming physical replication and archive-based
39353935
replication.
39363936
</para>
39373937

@@ -4042,7 +4042,7 @@ include_dir 'conf.d'
40424042
<para>
40434043
The local shell command to execute to retrieve an archived segment of
40444044
the WAL file series. This parameter is required for archive recovery,
4045-
but optional for streaming replication.
4045+
but optional for streaming physical replication.
40464046
Any <literal>%f</literal> in the string is
40474047
replaced by the name of the file to retrieve from the archive,
40484048
and any <literal>%p</literal> is replaced by the copy destination path name
@@ -4468,15 +4468,16 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
44684468
<title>Replication</title>
44694469

44704470
<para>
4471-
These settings control the behavior of the built-in
4472-
<firstterm>streaming replication</firstterm> feature (see
4473-
<xref linkend="streaming-replication"/>), and the built-in
4474-
<firstterm>logical replication</firstterm> feature (see
4471+
These settings control the behavior of
4472+
<firstterm>streaming replication</firstterm>,
4473+
both <firstterm>physical replication</firstterm>
4474+
(see <xref linkend="streaming-replication"/>) and
4475+
<firstterm>logical replication</firstterm> (see
44754476
<xref linkend="logical-replication"/>).
44764477
</para>
44774478

44784479
<para>
4479-
For <emphasis>streaming replication</emphasis>, servers will be either a
4480+
For <emphasis>physical replication</emphasis>, servers will be either a
44804481
primary or a standby server. Primaries can send data, while standbys
44814482
are always receivers of replicated data. When cascading replication
44824483
(see <xref linkend="cascading-replication"/>) is used, standby servers
@@ -4907,7 +4908,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
49074908
These settings control the behavior of a
49084909
<link linkend="standby-server-operation">standby server</link>
49094910
that is
4910-
to receive replication data. Their values on the primary server
4911+
to receive physical replication data. Their values on the primary server
49114912
are irrelevant.
49124913
</para>
49134914

@@ -5047,7 +5048,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
50475048
conflict with about-to-be-applied WAL entries, as described in
50485049
<xref linkend="hot-standby-conflict"/>.
50495050
<varname>max_standby_streaming_delay</varname> applies when WAL data is
5050-
being received via streaming replication.
5051+
being received via streaming physical replication.
50515052
If this value is specified without units, it is taken as milliseconds.
50525053
The default is 30 seconds.
50535054
A value of -1 allows the standby to wait forever for conflicting
@@ -5183,7 +5184,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
51835184
<listitem>
51845185
<para>
51855186
Specifies how long the standby server should wait when WAL data is not
5186-
available from any sources (streaming replication,
5187+
available from any sources (streaming physical replication,
51875188
local <filename>pg_wal</filename> or WAL archive) before trying
51885189
again to retrieve WAL data.
51895190
If this value is specified without units, it is taken as milliseconds.
@@ -5260,7 +5261,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
52605261
<filename>pg_wal</filename> directory.
52615262
</para>
52625263
<para>
5263-
This parameter is intended for use with streaming replication deployments;
5264+
This parameter is intended for use with streaming physical replication deployments;
52645265
however, if the parameter is specified it will be honored in all cases
52655266
except crash recovery.
52665267

doc/src/sgml/high-availability.sgml

Lines changed: 10 additions & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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
@@ -2496,8 +2496,8 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
24962496
<title>Monitoring</title>
24972497

24982498
<para>
2499-
Because logical replication is based on a similar architecture as
2500-
<link linkend="streaming-replication">physical streaming replication</link>,
2499+
Because streaming logical replication is based on a similar architecture as
2500+
<link linkend="streaming-replication">streaming physical replication</link>,
25012501
the monitoring on a publication node is similar to monitoring of a
25022502
physical replication primary
25032503
(see <xref linkend="streaming-replication-monitoring"/>).

doc/src/sgml/logicaldecoding.sgml

Lines changed: 3 additions & 3 deletions
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)