1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.18 2003/01/19 00:13:30 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.19 2003/03/20 05: 00:14 momjian Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -73,22 +73,21 @@ PostgreSQL documentation
73
73
<productname>PostgreSQL</productname> backend server, or displaying
74
74
the status of a running postmaster. Although the postmaster can be
75
75
started manually, <application>pg_ctl</application> encapsulates
76
- tasks such as redirecting log output, properly detaching from the
77
- terminal and process group, and it provides convenient options for
76
+ tasks such as redirecting log output and properly detaching from the
77
+ terminal and process group. It also provides convenient options for
78
78
controlled shutdown.
79
79
</para>
80
80
81
81
<para>
82
82
In <option>start</option> mode, a new postmaster is launched. The
83
- server is started in the background, the standard input attached to
83
+ server is started in the background, and standard input is attached to
84
84
<filename>/dev/null</filename>. The standard output and standard
85
- error are either appended to a log file, if the <option>-l</option>
86
- option is used, or are redirected to
87
- <application>pg_ctl</application>'s standard output (not standard
88
- error). If no log file is chosen, the standard output of
89
- <application>pg_ctl</application> should be redirected to a file or
90
- piped to another process, for example a log rotating program,
91
- otherwise the postmaster will write its output the the controlling
85
+ error are either appended to a log file (if the <option>-l</option>
86
+ option is used), or redirected to <application>pg_ctl</application>'s
87
+ standard output (not standard error). If no log file is chosen, the
88
+ standard output of <application>pg_ctl</application> should be redirected
89
+ to a file or piped to another process, for example a log rotating program,
90
+ otherwise the postmaster will write its output to the controlling
92
91
terminal (from the background) and will not leave the shell's
93
92
process group.
94
93
</para>
@@ -102,8 +101,8 @@ PostgreSQL documentation
102
101
not wait for clients to disconnect. All active transactions are
103
102
rolled back and clients are forcibly disconnected, then the
104
103
database is shut down. <quote>Immediate</quote> mode will abort
105
- all server processes without clean shutdown. This will lead to a recovery
106
- run on restart.
104
+ all server processes without a clean shutdown. This will lead to
105
+ a recovery run on restart.
107
106
</para>
108
107
109
108
<para>
@@ -121,9 +120,9 @@ PostgreSQL documentation
121
120
</para>
122
121
123
122
<para>
124
- <option>status</option> mode checks whether a postmaster is running
125
- and if so displays the <acronym>PID</acronym> and the command line
126
- options that were used to invoke it.
123
+ <option>status</option> mode checks whether a postmaster is running.
124
+ If it is, the <acronym>PID</acronym> and the command line
125
+ options that were used to invoke it are displayed .
127
126
</para>
128
127
</refsect1>
129
128
@@ -188,7 +187,7 @@ PostgreSQL documentation
188
187
<para>
189
188
Specifies the location of the <filename>postmaster</filename>
190
189
executable. By default the postmaster is taken from the same
191
- directory as <command>pg_ctl</>, or failing that, the hard-wired
190
+ directory as <command>pg_ctl</command >, or failing that, the hard-wired
192
191
installation directory. It is not necessary to use this
193
192
option unless you are doing something unusual and get errors
194
193
that the postmaster was not found.
@@ -210,7 +209,16 @@ PostgreSQL documentation
210
209
<listitem>
211
210
<para>
212
211
Wait for the start or shutdown to complete. Times out after
213
- 60 seconds. This is the default for shutdowns.
212
+ 60 seconds. This is the default for shutdowns. A successful
213
+ shutdown is indicated by removal of the <acronym>PID</scronym>
214
+ file. For starting up, a successful <command>psql -l</command>
215
+ indicates success. <command>pg_ctl</command> will attempt to
216
+ use the proper port for psql. If the environment variable
217
+ PGPORT exists, that is used. Otherwise, it will see if a port
218
+ has been set in the <filename>postgresql.conf</filename> file.
219
+ If neither of those is used, it will use the default port that
220
+ <productname>PostgreSQL</productname> was compiled with
221
+ (5432 by default).
214
222
</para>
215
223
</listitem>
216
224
</varlistentry>
@@ -238,7 +246,17 @@ PostgreSQL documentation
238
246
239
247
<listitem>
240
248
<para>
241
- Default data direction location
249
+ Default data directory location.
250
+ </para>
251
+ </listitem>
252
+ </varlistentry>
253
+
254
+ <varlistentry>
255
+ <term><envar>PGPORT</envar></term>
256
+
257
+ <listitem>
258
+ <para>
259
+ Default port for <xref linkend="app-psql"> (used by the -w option).
242
260
</para>
243
261
</listitem>
244
262
</varlistentry>
@@ -253,12 +271,58 @@ PostgreSQL documentation
253
271
<refsect1>
254
272
<title>Files</title>
255
273
256
- <para>
257
- If the file <filename>postmaster.opts.default</filename> exists in
258
- the data directory, the contents of the file will be passed as
259
- options to the <application>postmaster</application>, unless
260
- overridden by the <option>-o</option> option.
261
- </para>
274
+ <variablelist>
275
+ <varlistentry>
276
+ <term><filename>postmaster.pid</filename></term>
277
+
278
+ <listitem>
279
+ <para>The existence of this file in the data directory is used to help
280
+ <application>pg_ctl</application> determine if the server is
281
+ currently running or not.
282
+ </para>
283
+ </listitem>
284
+ </varlistentry>
285
+
286
+ <varlistentry>
287
+ <term><filename>postmaster.opts.default</filename></term>
288
+
289
+ <listitem>
290
+ <para>If this file exists in the data directory,
291
+ <application>pg_ctl</application> (in <option>start</option> mode)
292
+ will pass the contents of the file as options to the
293
+ <application>postmaster</application>, unless overridden
294
+ by the <option>-o</option> option.
295
+ </para>
296
+ </listitem>
297
+ </varlistentry>
298
+
299
+ <varlistentry>
300
+ <term><filename>postmaster.opts</filename></term>
301
+
302
+ <listitem>
303
+ <para>If this file exists in the data directory,
304
+ <application>pg_ctl</application> (in <option>restart</option> mode)
305
+ will pass the contents of the file as options to the
306
+ <application>postmaster</application>, unless overridden
307
+ by the <option>-o</option> option. The contents of this file
308
+ are also displayed in <option>status</option> mode.
309
+ </para>
310
+ </listitem>
311
+ </varlistentry>
312
+
313
+ <varlistentry>
314
+ <term><filename>postgresql.conf</filename></term>
315
+
316
+ <listitem>
317
+ <para>This file, located in the data directory, is parsed to
318
+ find the proper port to send to the
319
+ <application>psql</application> when the <option>-w</option>
320
+ is given in <option>start</option> mode.
321
+ </para>
322
+ </listitem>
323
+ </varlistentry>
324
+
325
+ </variablelist>
262
326
</refsect1>
263
327
264
328
@@ -268,7 +332,7 @@ PostgreSQL documentation
268
332
<para>
269
333
Waiting for complete start is not a well-defined operation and may
270
334
fail if access control is set up so that a local client cannot
271
- connect without manual interaction. It should be avoided .
335
+ connect without manual interaction (e.g. password authentication) .
272
336
</para>
273
337
</refsect1>
274
338
0 commit comments