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

Commit08f245b

Browse files
committed
Add doc file for pg_resetxlog.
1 parent33e3c9b commit08f245b

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

‎doc/src/sgml/ref/pg_resetxlog.sgml‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.1 2002/08/17 02:45:29 momjian Exp $
3+
PostgreSQL documentation
4+
-->
5+
6+
<refentry id="APP-PGRESETXLOG">
7+
<refmeta>
8+
<refentrytitle id="APP-PGRESETXLOG-TITLE"><application>pg_resetxlog</application></refentrytitle>
9+
<manvolnum>1</manvolnum>
10+
<refmiscinfo>Application</refmiscinfo>
11+
</refmeta>
12+
13+
<refnamediv>
14+
<refname>pg_resetxlog</refname>
15+
<refpurpose>reset write-ahead log file and optionally the pg_controldata file</refpurpose>
16+
</refnamediv>
17+
18+
<refsynopsisdiv>
19+
<cmdsynopsis>
20+
<command>pg_resetxlog</command>
21+
<arg><replaceable choice="plain">datadir</replaceable></arg>
22+
</cmdsynopsis>
23+
</refsynopsisdiv>
24+
25+
<refsect1 id="R1-APP-PGRESETXLOG-1">
26+
<title>Description</title>
27+
<para>
28+
<command>pg_resetxlog</command> clears the write-ahead log file and
29+
optionally the <filename>pg_controldata</> file. This is
30+
used so the server can be started after these files have become corrupted.
31+
(In every reported case, such file corruption has been caused
32+
by faulty hardware.) It is to be used only as a last resort,
33+
when the server will not start due to such corruption.
34+
</para>
35+
36+
<para>
37+
After running this command, the server may contain index corruption and
38+
partially-committed transactions. You should immediately dump your data
39+
and reload. After reload, check for partially committed transactions
40+
that may have been open at the time of the server crash.
41+
</para>
42+
43+
<para>
44+
<command>pg_resetxlog</command> can also fix a corrupted
45+
<filename>pg_controldata</> file using the <literal>-f</>
46+
flag. Use this option when <command>pg_resetxlog</> reports it can't
47+
reconstruct valid data for pg_control.
48+
</para>
49+
50+
<para>
51+
<command>pg_resetxlog</command> has a few more options for
52+
special purposes. Run the command with no arguments to see them.
53+
</para>
54+
55+
<para>
56+
This utility can only be run by the user who installed the server because
57+
it requires read/write access to the <literal>datadir</>.
58+
For safety reasons, you must specify the data directory on the command line.
59+
It does not use the environment variable <envar>PGDATA</>.
60+
</para>
61+
</refsect1>
62+
63+
<refsect1>
64+
<title>Notes</title>
65+
66+
<para>
67+
This command can not be used when the <application>postmaster</> is
68+
running.
69+
</para>
70+
</refsect1>
71+
72+
</refentry>
73+
74+
<!-- Keep this comment at the end of the file
75+
Local variables:
76+
mode: sgml
77+
sgml-omittag:nil
78+
sgml-shorttag:t
79+
sgml-minimize-attributes:nil
80+
sgml-always-quote-attributes:t
81+
sgml-indent-step:1
82+
sgml-indent-data:t
83+
sgml-parent-document:nil
84+
sgml-default-dtd-file:"../reference.ced"
85+
sgml-exposed-tags:nil
86+
sgml-local-catalogs:"/usr/lib/sgml/catalog"
87+
sgml-local-ecat-files:nil
88+
End:
89+
-->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp