Skip to content

Commit 96e60c9

Browse files
author
Liudmila Mantrova
committed
documented timestamp options
1 parent 084bab1 commit 96e60c9

File tree

1 file changed

+71
-11
lines changed

1 file changed

+71
-11
lines changed

doc/src/sgml/ref/pg_xlogdump.sgml

Lines changed: 71 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ doc/src/sgml/ref/pg_xlogdump.sgml
2323
<cmdsynopsis>
2424
<command>pg_xlogdump</command>
2525
<arg rep="repeat" choice="opt"><option>option</option></arg>
26+
<arg rep="repeat" choice="opt"><option>timestamp-option</option></arg>
2627
<arg choice="opt"><option>startseg</option>
2728
<arg choice="opt"><option>endseg</option></arg>
2829
</arg>
@@ -32,8 +33,8 @@ doc/src/sgml/ref/pg_xlogdump.sgml
3233
<refsect1 id="R1-APP-PGXLOGDUMP-1">
3334
<title>Description</title>
3435
<para>
35-
<command>pg_xlogdump</command> displays the write-ahead log (WAL) and is mainly
36-
useful for debugging or educational purposes.
36+
<command>pg_xlogdump</command> displays the write-ahead log (WAL) and prints timestamps for WAL records.
37+
This utility is mainly useful for debugging or educational purposes.
3738
</para>
3839

3940
<para>
@@ -55,7 +56,7 @@ doc/src/sgml/ref/pg_xlogdump.sgml
5556
<term><replaceable class="parameter">startseg</replaceable></term>
5657
<listitem>
5758
<para>
58-
Start reading at the specified log segment file. This implicitly determines
59+
Start reading at the specified log segment file. This implicitly determines
5960
the path in which files will be searched for, and the timeline to use.
6061
</para>
6162
</listitem>
@@ -117,9 +118,9 @@ doc/src/sgml/ref/pg_xlogdump.sgml
117118
<term><option>--path=<replaceable>path</replaceable></option></term>
118119
<listitem>
119120
<para>
120-
Specifies a directory to search for log segment files or a
121+
Specify a directory to search for log segment files or a
121122
directory with a <literal>pg_xlog</literal> subdirectory that
122-
contains such files. The default is to search in the current
123+
contains such files. The default is to search in the current
123124
directory, the <literal>pg_xlog</literal> subdirectory of the
124125
current directory, and the <literal>pg_xlog</literal> subdirectory
125126
of <envar>PGDATA</envar>.
@@ -132,9 +133,9 @@ doc/src/sgml/ref/pg_xlogdump.sgml
132133
<term><option>--rmgr=<replaceable>rmgr</replaceable></option></term>
133134
<listitem>
134135
<para>
135-
Only display records generated by the specified resource manager.
136-
If <literal>list</> is passed as name, print a list of valid resource manager
137-
names, and exit.
136+
Only display records generated by the specified <literal>rmgr</literal> resource manager.
137+
If you pass <literal>list</> as an argument, <application>pg_xlogdump</application> prints a list of valid resource manager
138+
names and exits.
138139
</para>
139140
</listitem>
140141
</varlistentry>
@@ -206,12 +207,71 @@ doc/src/sgml/ref/pg_xlogdump.sgml
206207
</varlistentry>
207208
</variablelist>
208209
</para>
210+
211+
<para>
212+
The following command-line options enable printing timestamps for various types of WAL records. You can use these options together with
213+
<replaceable class="parameter">startseg</replaceable>, <replaceable class="parameter">endseg</replaceable>, <option>-s</option>, and <option>-e</option> options.
214+
<variablelist>
215+
216+
<varlistentry>
217+
<term><option>-E</option></term>
218+
<listitem>
219+
<para>
220+
Print the timestamp of the last WAL record of the specified type found in the log segment file. When using this option, you must also specify the <option>-S</option> option.</para>
221+
<para>By default, <application>pg_xlogdump</application> prints timestamps only for COMMIT records. You can specify other record types using the <option>-F</option> option.
222+
</para>
223+
</listitem>
224+
</varlistentry>
225+
226+
<varlistentry>
227+
<term><option>-F</option> [<replaceable>argument1</replaceable>,<replaceable>argument2</replaceable>,...]</term>
228+
<listitem>
229+
<para>
230+
Specify WAL record types for which to print timestamps. When using this option, you must also specify the <option>-S</option> option.</para>
231+
<para>The <option>-F</option> option can take the following arguments, in the comma-separated format:</para>
232+
<itemizedlist>
233+
<listitem>
234+
<para><option>XLOG_RESTORE_POINT</option> &mdash; named restore points created with the <link linkend="functions-admin-backup">pg_create_restore_point()</link> function.</para>
235+
</listitem>
236+
<listitem>
237+
<para><option>XLOG_XACT_COMMIT</option> &mdash; commit records for transactions. These records are caused by the <xref linkend="sql-commit"> command.</para>
238+
</listitem>
239+
<listitem>
240+
<para><option>XLOG_XACT_COMMIT_PREPARED</option> &mdash; commit records for transactions that were earlier prepared for a two-phase commit. These records are caused by the <xref linkend="sql-commit-prepared"> command.</para>
241+
</listitem>
242+
<listitem>
243+
<para><option>XLOG_XACT_ABORT</option> &mdash; abort records for transactions. These records are caused by the <xref linkend="sql-rollback"> command.</para>
244+
</listitem>
245+
<listitem>
246+
<para><option>XLOG_XACT_ABORT_PREPARED</option> &mdash; abort records for transactions that were earlier prepared for a two-phase commit. These records are caused by the <xref linkend="sql-rollback-prepared"> command.</para>
247+
</listitem>
248+
</itemizedlist>
249+
<para>By default, <application>pg_xlogdump</application> prints timestamps only for COMMIT records.
250+
</para>
251+
</listitem>
252+
</varlistentry>
253+
254+
<varlistentry>
255+
<term><option>-S</option></term>
256+
<listitem>
257+
<para>
258+
Print the timestamp of the first WAL record of the specified type found in the log segment file. This option is required if you are going to use <option>-E</option> or <option>-F</option> options.</para>
259+
<para>By default, <application>pg_xlogdump</application> prints timestamps only for COMMIT records. You can specify other record types using the <option>-F</option> option.
260+
</para>
261+
</listitem>
262+
</varlistentry>
263+
264+
265+
</variablelist>
266+
</para>
267+
268+
209269
</refsect1>
210270

211271
<refsect1>
212272
<title>Notes</title>
213273
<para>
214-
Can give wrong results when the server is running.
274+
<application>pg_xlogdump</> can give wrong results when the server is running.
215275
</para>
216276

217277
<para>
@@ -221,8 +281,8 @@ doc/src/sgml/ref/pg_xlogdump.sgml
221281

222282
<para>
223283
<application>pg_xlogdump</> cannot read WAL files with suffix
224-
<literal>.partial</>. If those files need to be read, <literal>.partial</>
225-
suffix needs to be removed from the file name.
284+
<literal>.partial</>. If such files need to be read, <literal>.partial</>
285+
remove the suffix from the filename.
226286
</para>
227287
</refsect1>
228288

0 commit comments

Comments
 (0)