Skip to content

Commit 4eb0ff4

Browse files
xzillaCommitfest Bot
authored andcommitted
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 12efa48 commit 4eb0ff4

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
@@ -2068,7 +2068,7 @@ include_dir 'conf.d'
20682068
<para>
20692069
Specifies the maximum amount of memory to be used by logical decoding,
20702070
before some of the decoded changes are written to local disk. This
2071-
limits the amount of memory used by logical streaming replication
2071+
limits the amount of memory used by streaming logical replication
20722072
connections. It defaults to 64 megabytes (<literal>64MB</literal>).
20732073
Since each replication connection only uses a single buffer of this size,
20742074
and an installation normally doesn't have many such connections
@@ -3787,7 +3787,7 @@ include_dir 'conf.d'
37873787
difference between the two modes, but when set to <literal>always</literal>
37883788
the WAL archiver is enabled also during archive recovery or standby
37893789
mode. In <literal>always</literal> mode, all files restored from the archive
3790-
or streamed with streaming replication will be archived (again). See
3790+
or streamed with streaming physical replication will be archived (again). See
37913791
<xref linkend="continuous-archiving-in-standby"/> for details.
37923792
</para>
37933793
<para>
@@ -3893,7 +3893,7 @@ include_dir 'conf.d'
38933893
full files. Therefore, it is unwise to use a very short
38943894
<varname>archive_timeout</varname> &mdash; it will bloat your archive
38953895
storage. <varname>archive_timeout</varname> settings of a minute or so are
3896-
usually reasonable. You should consider using streaming replication,
3896+
usually reasonable. You should consider using streaming physical replication,
38973897
instead of archiving, if you want data to be copied off the primary
38983898
server more quickly than that.
38993899
If this value is specified without units, it is taken as seconds.
@@ -3918,7 +3918,7 @@ include_dir 'conf.d'
39183918

39193919
<para>
39203920
This section describes the settings that apply to recovery in general,
3921-
affecting crash recovery, streaming replication and archive-based
3921+
affecting crash recovery, streaming physical replication and archive-based
39223922
replication.
39233923
</para>
39243924

@@ -4028,7 +4028,7 @@ include_dir 'conf.d'
40284028
<para>
40294029
The local shell command to execute to retrieve an archived segment of
40304030
the WAL file series. This parameter is required for archive recovery,
4031-
but optional for streaming replication.
4031+
but optional for streaming physical replication.
40324032
Any <literal>%f</literal> in the string is
40334033
replaced by the name of the file to retrieve from the archive,
40344034
and any <literal>%p</literal> is replaced by the copy destination path name
@@ -4454,15 +4454,16 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
44544454
<title>Replication</title>
44554455

44564456
<para>
4457-
These settings control the behavior of the built-in
4458-
<firstterm>streaming replication</firstterm> feature (see
4459-
<xref linkend="streaming-replication"/>), and the built-in
4460-
<firstterm>logical replication</firstterm> feature (see
4457+
These settings control the behavior of
4458+
<firstterm>streaming replication</firstterm>,
4459+
both <firstterm>physical replication</firstterm>
4460+
(see <xref linkend="streaming-replication"/>) and
4461+
<firstterm>logical replication</firstterm> (see
44614462
<xref linkend="logical-replication"/>).
44624463
</para>
44634464

44644465
<para>
4465-
For <emphasis>streaming replication</emphasis>, servers will be either a
4466+
For <emphasis>physical replication</emphasis>, servers will be either a
44664467
primary or a standby server. Primaries can send data, while standbys
44674468
are always receivers of replicated data. When cascading replication
44684469
(see <xref linkend="cascading-replication"/>) is used, standby servers
@@ -4893,7 +4894,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
48934894
These settings control the behavior of a
48944895
<link linkend="standby-server-operation">standby server</link>
48954896
that is
4896-
to receive replication data. Their values on the primary server
4897+
to receive physical replication data. Their values on the primary server
48974898
are irrelevant.
48984899
</para>
48994900

@@ -5033,7 +5034,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
50335034
conflict with about-to-be-applied WAL entries, as described in
50345035
<xref linkend="hot-standby-conflict"/>.
50355036
<varname>max_standby_streaming_delay</varname> applies when WAL data is
5036-
being received via streaming replication.
5037+
being received via streaming physical replication.
50375038
If this value is specified without units, it is taken as milliseconds.
50385039
The default is 30 seconds.
50395040
A value of -1 allows the standby to wait forever for conflicting
@@ -5169,7 +5170,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
51695170
<listitem>
51705171
<para>
51715172
Specifies how long the standby server should wait when WAL data is not
5172-
available from any sources (streaming replication,
5173+
available from any sources (streaming physical replication,
51735174
local <filename>pg_wal</filename> or WAL archive) before trying
51745175
again to retrieve WAL data.
51755176
If this value is specified without units, it is taken as milliseconds.
@@ -5246,7 +5247,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
52465247
<filename>pg_wal</filename> directory.
52475248
</para>
52485249
<para>
5249-
This parameter is intended for use with streaming replication deployments;
5250+
This parameter is intended for use with streaming physical replication deployments;
52505251
however, if the parameter is specified it will be honored in all cases
52515252
except crash recovery.
52525253

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
@@ -2229,8 +2229,8 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
22292229
<title>Monitoring</title>
22302230

22312231
<para>
2232-
Because logical replication is based on a similar architecture as
2233-
<link linkend="streaming-replication">physical streaming replication</link>,
2232+
Because streaming logical replication is based on a similar architecture as
2233+
<link linkend="streaming-replication">streaming physical replication</link>,
22342234
the monitoring on a publication node is similar to monitoring of a
22352235
physical replication primary
22362236
(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)