Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb135e8

Browse files
committed
doc: Clarify some things on pg_receivexlog reference page
1 parent9be3a4e commitdb135e8

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

‎doc/src/sgml/ref/pg_receivexlog.sgml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ PostgreSQL documentation
3131
Description
3232
</title>
3333
<para>
34-
<application>pg_receivexlog</application> is used to stream transaction log
34+
<application>pg_receivexlog</application> is used to streamthetransaction log
3535
from a running <productname>PostgreSQL</productname> cluster. The transaction
3636
log is streamed using the streaming replication protocol, and is written
3737
to a local directory of files. This directory can be used as the archive
@@ -49,19 +49,19 @@ PostgreSQL documentation
4949
</para>
5050

5151
<para>
52-
Unlike thestandby'sWAL receiver, <application>pg_receivexlog</>
52+
Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivexlog</>
5353
by default flushes WAL data only when a WAL file is closed.
54-
<literal>--synchronous</> option must be specified to flush WAL data
55-
in real time and ensure it's safely flushed to disk.
54+
The option <option>--synchronous</> must be specified to flush WAL data
55+
in real time.
5656
</para>
5757

5858
<para>
5959
The transaction log is streamed over a regular
60-
<productname>PostgreSQL</productname> connection, and uses the replication
60+
<productname>PostgreSQL</productname> connection and uses the replication
6161
protocol. The connection must be made with a superuser or a user
6262
having <literal>REPLICATION</literal> permissions (see
6363
<xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
64-
mustexplicitlypermit the replication connection. The server must also be
64+
must permit the replication connection. The server must also be
6565
configured with <xref linkend="guc-max-wal-senders"> set high enough to
6666
leave at least one session available for the stream.
6767
</para>
@@ -137,10 +137,18 @@ PostgreSQL documentation
137137
When this option is used, <application>pg_receivexlog</> will report
138138
a flush position to the server, indicating when each segment has been
139139
synchronized to disk so that the server can remove that segment if it
140-
is not otherwise needed. <literal>--synchronous</literal> option must
141-
be specified when making <application>pg_receivexlog</> run as
142-
synchronous standby by using replication slot. Otherwise WAL data
143-
cannot be flushed frequently enough for this to work correctly.
140+
is not otherwise needed.
141+
</para>
142+
143+
<para>
144+
When the replication client
145+
of <application>pg_receivexlog</application> is configured on the
146+
server as a synchronous standby, then using a replication slot will
147+
report the flush position to the server, but only when a WAL file is
148+
closed. Therefore, that configuration will cause transactions on the
149+
primary to wait for a long time and effectively not work
150+
satisfactorily. The option <literal>--synchronous</literal> (see
151+
below) must be specified in addition to make this work correctly.
144152
</para>
145153
</listitem>
146154
</varlistentry>
@@ -153,6 +161,13 @@ PostgreSQL documentation
153161
send a status packet back to the server immediately after flushing,
154162
regardless of <literal>--status-interval</>.
155163
</para>
164+
165+
<para>
166+
This option should be specified if the replication client
167+
of <application>pg_receivexlog</application> is configured on the
168+
server as a synchronous standby, to ensure that timely feedback is
169+
sent to the server.
170+
</para>
156171
</listitem>
157172
</varlistentry>
158173

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp