Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7c6c09c

Browse files
committed
Small streaming replication document improvements. Be more explicit that
it's asynchronous.
1 parent cd2b7d3 commit 7c6c09c

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

doc/src/sgml/high-availability.sgml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/high-availability.sgml,v 1.49 2010/02/22 11:47:30 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/high-availability.sgml,v 1.50 2010/02/25 08:57:47 heikki Exp $ -->
22

33
<chapter id="high-availability">
44
<title>High Availability, Load Balancing, and Replication</title>
@@ -523,8 +523,8 @@ protocol to make nodes agree on a serializable transactional order.
523523
<varname>archive_timeout</varname> parameter, which can be set as low
524524
as a few seconds. However such a low setting will
525525
substantially increase the bandwidth required for file shipping.
526-
If you need a window of less than a minute or so, it is probably better
527-
to consider record-based log shipping.
526+
If you need a window of less than a minute or so, consider using
527+
<xref linkend="streaming-replication">.
528528
</para>
529529

530530
<para>
@@ -762,19 +762,25 @@ if (!triggered)
762762
</indexterm>
763763

764764
<para>
765-
<productname>PostgreSQL</> includes a simple streaming replication
766-
mechanism, which allows the standby server to stay more up-to-date than
767-
file-based log shipping. The standby connects to the primary
768-
and the primary starts streaming WAL records from where the standby
769-
left off, and continues streaming them as they are generated, without
770-
waiting for the WAL file to be filled. So with streaming replication,
771-
<varname>archive_timeout</> does not need to be changed to reduce
772-
possible data loss.
765+
Streaming replication allows a standby server to stay more up-to-date
766+
than is possible with file-based log shipping. The standby connects
767+
to the primary, which streams WAL records to the standby as they're
768+
generated, without waiting for the WAL file to be filled.
769+
</para>
770+
771+
<para>
772+
Streaming replication is asynchronous, so there is stilll a small delay
773+
between committing a transaction in the primary and for the changes to
774+
become visible in the standby. The delay is however much smaller than with
775+
file-based log shipping, typically under one second assuming the standby
776+
is powerful enough to keep up with the load. With streaming replication,
777+
<varname>archive_timeout</> is not required to reduce the data loss
778+
window.
773779
</para>
774780

775781
<para>
776782
Streaming replication relies on file-based continuous archiving for
777-
making the base backup and for allowing a standby to catch up if it is
783+
making the base backup and for allowing the standby to catch up if it is
778784
disconnected from the primary for long enough for the primary to
779785
delete old WAL files still required by the standby.
780786
</para>
@@ -796,19 +802,18 @@ if (!triggered)
796802
<listitem>
797803
<para>
798804
Set up continuous archiving from the primary to a WAL archive located
799-
in a directory on the standby server. Ensure that
800-
<xref linkend="guc-archive-mode">,
801-
<xref linkend="guc-archive-command"> and
802-
<xref linkend="guc-archive-timeout">
803-
are set appropriately on the primary
805+
in a directory on the standby server. In particular, set
806+
<xref linkend="guc-archive-mode"> and
807+
<xref linkend="guc-archive-command">
808+
to archive WAL files in a location accessible from the standby
804809
(see <xref linkend="backup-archiving-wal">).
805810
</para>
806811
</listitem>
807812

808813
<listitem>
809814
<para>
810815
Set <xref linkend="guc-listen-addresses"> and authentication options
811-
(see <filename>pg_hba.conf</>) so the standby server can connect to
816+
(see <filename>pg_hba.conf</>) on the primary so that the standby server can connect to
812817
the <literal>replication</> pseudo-database on the primary server (see
813818
<xref linkend="streaming-replication-authentication">).
814819
</para>

0 commit comments

Comments
 (0)