summaryrefslogtreecommitdiff
path: root/doc/src/sgml/pgxcclean.sgml
blob: fc985bf802df5788e1b01c541b1b28e47299040b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<sect1 id="pgxcclean" xreflabel="pgxcclean">

<title>pgxc_clean</title>

 <indexterm zone="pgxcclean">
  <primary>pgxc_clean</primary>
 </indexterm>

 <sect2>
  <title>Overview</title>

    <para>
      pgxc_clean has the following syntax.
<programlisting>
pgxc_clean <optional> <replaceable>option</> </optional> <optional><replaceable>dbname</><optional><replaceable>username</></optional></optional>
</programlisting>
    </para>

    <para>
     <application>pgxc_clean</application> is a Postgres-XL utility to maintain
     transaction status after a crash.  When a Postgres-XL node crashes and
     recovers or fails over, the commit status of the node may be inconsistent
     with other nodes.   <application>pgxc_clean</application> checks
     transaction commit status and corrects them.
    </para>

    <para>
     You should run this utility against one of the available Coordinators. The
     tool cleans up transaction status of all nodes automatically.
    </para>
 </sect2>

 <sect2>
  <title>Options</title>

  <variablelist>
    <varlistentry>
      <term><option>-a</></term>
      <term><option>--all</></term>
      <listitem>
      <para>
       Cleanup all the database available.
      <literal>all</literal>.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-d<replaceable class="parameter">databasename</replaceable></option></term>
      <term><option>--dbname=<replaceable class="parameter">databasename</replaceable></option></term>
      <listitem>
      <para>
       Database name to clean up.  This option can be specified multiple times for more than one database.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-h<replaceable class="parameter">hostname</replaceable></></term>
      <term><option>--command=<replaceable class="parameter">hostname</replaceable></></term>
      <listitem>
      <para>
      Hostname of the Coordinator to connect to.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-N</></term>
      <term><option>--no-clean</></term>
      <listitem>
      <para>
       If this option is specified, <application>pgxc_clean</> will
       not perform the cleanup.  It just investigates transaction status.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-o <replaceable class="parameter">filename</replaceable></></term>
      <term><option>--output=<replaceable class="parameter">filename</replaceable></></term>
      <listitem>
      <para>
       Name of the file where <application>pgxc_clean</> output will
       be written.  If not specified, stdout and stderr will be used.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-p <replaceable class="parameter">port_number</replaceable></></term>
      <term><option>--port=<replaceable class="parameter">port_number</replaceable></></term>
      <listitem>
      <para>
       Specifies the port number of the Coordinator.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-q</></term>
      <term><option>--quiet</></term>
      <listitem>
      <para>
       Surpress messages as much as possible.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-s</></term>
      <term><option>--status</></term>
      <listitem>
      <para>
       Prints investigated two phase commit status.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-U <replaceable class="parameter">username</replaceable></></term>
      <term><option>--username=<replaceable class="parameter">username</replaceable></></term>
      <listitem>
      <para>
       User name to use.   You must be a superuser of the database.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-v</></term>
      <term><option>--verbose</></term>
      <listitem>
      <para>
       Write as much information as possible.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-V</></term>
      <term><option>--version</></term>
      <listitem>
      <para>
       Writes the version of the utility and exits.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-w</></term>
     <term><option>--no-password</></term>
     <listitem>
      <para>
       Never issue a password prompt.  If the server requires password
       authentication and a password is not available by other means
       such as a <filename>.pgpass</filename> file, the connection
       attempt will fail.  This option can be useful in batch jobs and
       scripts where no user is present to enter a password.
      </para>

      <para>
       Note that this option will remain set for the entire session,
       and so it affects uses of the meta-command
       <command>\connect</command> as well as the initial connection attempt.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-W</></term>
      <term><option>--password</></term>
      <listitem>
      <para>
       Force <application>psql</application> to prompt for a
       password before connecting to a database.
      </para>

      <para>
       This option is never essential, since <application>psql</application>
       will automatically prompt for a password if the server demands
       password authentication.  However, <application>psql</application>
       will waste a connection attempt finding out that the server wants a
       password.  In some cases it is worth typing <option>-W</> to avoid
       the extra connection attempt.
      </para>

      <para>
       Note that this option will remain set for the entire session,
       and so it affects uses of the meta-command
       <command>\connect</command> as well as the initial connection attempt.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-?</></term>
      <term><option>--help</></term>
      <listitem>
      <para>
      Show help about <application>psql</application> command line
      arguments, and exit.
      </para>
      </listitem>
    </varlistentry>

  </variablelist>
 </sect2>

</sect1>