@@ -31,7 +31,7 @@ PostgreSQL documentation
31
31
Description
32
32
</title>
33
33
<para>
34
- <application>pg_receivexlog</application> is used to stream transaction log
34
+ <application>pg_receivexlog</application> is used to stream the transaction log
35
35
from a running <productname>PostgreSQL</productname> cluster. The transaction
36
36
log is streamed using the streaming replication protocol, and is written
37
37
to a local directory of files. This directory can be used as the archive
@@ -49,19 +49,19 @@ PostgreSQL documentation
49
49
</para>
50
50
51
51
<para>
52
- Unlike the standby's WAL receiver, <application>pg_receivexlog</>
52
+ Unlike the WAL receiver of a PostgreSQL standby server , <application>pg_receivexlog</>
53
53
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.
56
56
</para>
57
57
58
58
<para>
59
59
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
61
61
protocol. The connection must be made with a superuser or a user
62
62
having <literal>REPLICATION</literal> permissions (see
63
63
<xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
64
- must explicitly permit the replication connection. The server must also be
64
+ must permit the replication connection. The server must also be
65
65
configured with <xref linkend="guc-max-wal-senders"> set high enough to
66
66
leave at least one session available for the stream.
67
67
</para>
@@ -137,10 +137,18 @@ PostgreSQL documentation
137
137
When this option is used, <application>pg_receivexlog</> will report
138
138
a flush position to the server, indicating when each segment has been
139
139
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.
144
152
</para>
145
153
</listitem>
146
154
</varlistentry>
@@ -153,6 +161,13 @@ PostgreSQL documentation
153
161
send a status packet back to the server immediately after flushing,
154
162
regardless of <literal>--status-interval</>.
155
163
</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>
156
171
</listitem>
157
172
</varlistentry>
158
173
0 commit comments