~ubuntu-branches/ubuntu/vivid/postgresql-9.4/vivid-proposed

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/pg_receivexlog.sgml

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2014-11-18 09:49:04 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20141118094904-f7f1jhitn5iadkgn
Tags: 9.4~rc1-1
* First 9.4 RC release.
* Update psql call in dump-reload instructions.
* Reenable 010_pg_basebackup.t tests, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 <refnamediv>
18
18
  <refname>pg_receivexlog</refname>
19
 
  <refpurpose>streams transaction logs from a <productname>PostgreSQL</productname> cluster</refpurpose>
 
19
  <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
20
20
 </refnamediv>
21
21
 
22
22
 <refsynopsisdiv>
71
71
 <refsect1>
72
72
  <title>Options</title>
73
73
 
74
 
   <para>
75
 
    The following command-line options control the location and format of the
76
 
    output.
77
 
 
78
74
    <variablelist>
79
75
     <varlistentry>
80
76
      <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
88
84
       </para>
89
85
      </listitem>
90
86
     </varlistentry>
91
 
    </variablelist>
92
 
   </para>
93
 
   <para>
94
 
    The following command-line options control the running of the program.
95
87
 
96
 
    <variablelist>
97
88
     <varlistentry>
98
89
      <term><option>-n</option></term>
99
90
      <term><option>--no-loop</option></term>
106
97
     </varlistentry>
107
98
 
108
99
     <varlistentry>
 
100
      <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
 
101
      <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
 
102
      <listitem>
 
103
       <para>
 
104
        Specifies the number of seconds between status packets sent back to the
 
105
        server. This allows for easier monitoring of the progress from server.
 
106
        A value of zero disables the periodic status updates completely,
 
107
        although an update will still be sent when requested by the server, to
 
108
        avoid timeout disconnect. The default value is 10 seconds.
 
109
       </para>
 
110
      </listitem>
 
111
     </varlistentry>
 
112
 
 
113
     <varlistentry>
 
114
      <term><option>-S <replaceable>slotname</replaceable></option></term>
 
115
      <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
 
116
      <listitem>
 
117
        <para>
 
118
         Require <application>pg_receivexlog</application> to use an existing
 
119
         replication slot (see <xref linkend="streaming-replication-slots">).
 
120
         When this option is used, <application>pg_receivexlog</> will report
 
121
         a flush position to the server, indicating when each segment has been
 
122
         synchronized to disk so that the server can remove that segment if it
 
123
         is not otherwise needed.  When using this parameter, it is important
 
124
         to make sure that <application>pg_receivexlog</> cannot become the
 
125
         synchronous standby through an incautious setting of
 
126
         <xref linkend="guc-synchronous-standby-names">; it does not flush
 
127
         data frequently enough for this to work correctly.
 
128
        </para>
 
129
      </listitem>
 
130
     </varlistentry>
 
131
 
 
132
     <varlistentry>
109
133
      <term><option>-v</option></term>
110
134
      <term><option>--verbose</option></term>
111
135
      <listitem>
114
138
       </para>
115
139
      </listitem>
116
140
     </varlistentry>
117
 
 
118
141
    </variablelist>
119
 
   </para>
120
142
 
121
143
   <para>
122
144
    The following command-line options control the database connection parameters.
167
189
     </varlistentry>
168
190
 
169
191
     <varlistentry>
170
 
      <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
171
 
      <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
172
 
      <listitem>
173
 
       <para>
174
 
        Specifies the number of seconds between status packets sent back to the
175
 
        server. This allows for easier monitoring of the progress from server.
176
 
        A value of zero disables the periodic status updates completely,
177
 
        although an update will still be sent when requested by the server, to
178
 
        avoid timeout disconnect. The default value is 10 seconds.
179
 
       </para>
180
 
      </listitem>
181
 
     </varlistentry>
182
 
 
183
 
     <varlistentry>
184
192
      <term><option>-U <replaceable>username</replaceable></option></term>
185
193
      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
186
194
      <listitem>
225
233
       </para>
226
234
      </listitem>
227
235
     </varlistentry>
228
 
 
229
 
     <varlistentry>
230
 
      <term><option>-S <replaceable>slotname</replaceable></option></term>
231
 
      <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
232
 
      <listitem>
233
 
        <para>
234
 
         Require <application>pg_receivexlog</application> to use an existing
235
 
         replication slot (see <xref linkend="streaming-replication-slots">).
236
 
         When this option is used, <application>pg_receivexlog</> will report
237
 
         a flush position to the server, indicating when each segment has been
238
 
         synchronized to disk so that the server can remove that segment if it
239
 
         is not otherwise needed.  When using this parameter, it is important
240
 
         to make sure that <application>pg_receivexlog</> cannot become the
241
 
         synchronous standby through an incautious setting of
242
 
         <xref linkend="guc-synchronous-standby-names">; it does not flush
243
 
         data frequently enough for this to work correctly.
244
 
        </para>
245
 
      </listitem>
246
 
     </varlistentry>
247
236
    </variablelist>
248
237
   </para>
249
238
 
293
282
 
294
283
  <para>
295
284
   When using <application>pg_receivexlog</application> instead of
296
 
   <xref linkend="guc-archive-command">, the server will continue to
297
 
   recycle transaction log files even if the backups are not properly
298
 
   archived, since there is no command that fails. This can be worked
299
 
   around by having an <xref linkend="guc-archive-command"> that fails
300
 
   when the file has not been properly archived yet, for example:
301
 
<programlisting>
302
 
archive_command = 'sleep 5 &amp;&amp; test -f /mnt/server/archivedir/%f'
303
 
</programlisting>
304
 
   The initial timeout is necessary because
305
 
   <application>pg_receivexlog</application> works using asynchronous
306
 
   replication and can therefore be slightly behind the master.
 
285
   <xref linkend="guc-archive-command"> as the main WAL backup method, it is
 
286
   strongly recommended to use replication slots.  Otherwise, the server is
 
287
   free to recycle or remove transaction log files before they are backed up,
 
288
   because it does not have any information, either
 
289
   from <xref linkend="guc-archive-command"> or the replication slots, about
 
290
   how far the WAL stream has been archived.  Note, however, that a
 
291
   replication slot will fill up the server's disk space if the receiver does
 
292
   not keep up with fetching the WAL data.
307
293
  </para>
308
294
 
309
295
 </refsect1>