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

Commit665066f

Browse files
committed
Further work on postmaster and postgres reference pages.
1 parent1fadb05 commit665066f

File tree

3 files changed

+101
-29
lines changed

3 files changed

+101
-29
lines changed

‎doc/src/sgml/ref/postgres-ref.sgml

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.20 2001/09/27 16:29:12 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.21 2001/11/25 01:11:36 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -43,6 +43,7 @@ Postgres documentation
4343
</group>
4444
<arg>-S <replaceable>sort-mem</replaceable></arg>
4545
<arg>-W <replaceable>seconds</replaceable></arg>
46+
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
4647
<arg choice="plain"><replaceable>database</replaceable></arg>
4748
<sbr>
4849
<!-- postmaster fork -->
@@ -67,6 +68,7 @@ Postgres documentation
6768
<arg>-S <replaceable>sort-mem</replaceable></arg>
6869
<arg>-v <replaceable>protocol-version</replaceable></arg>
6970
<arg>-W <replaceable>seconds</replaceable></arg>
71+
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
7072
</cmdsynopsis>
7173
</refsynopsisdiv>
7274

@@ -87,8 +89,9 @@ Postgres documentation
8789
conceptually, since both <filename>postmaster</filename> and
8890
<filename>postgres</filename> are in fact the same program); it
8991
should not be invoked directly this way. The first form invokes
90-
the server directly in interactive mode. The primary use for this
91-
mode is for bootstrapping by <xref linkend="app-initdb">.
92+
the server directly in interactive single-user mode. The primary use
93+
for this mode is during bootstrapping by <xref linkend="app-initdb">.
94+
Sometimes it is used for debugging or disaster recovery.
9295
</para>
9396

9497
<para>
@@ -138,8 +141,8 @@ Postgres documentation
138141
<para>
139142
The options <option>-A</option>, <option>-B</option>,
140143
<option>-c</option>, <option>-d</option>, <option>-D</option>,
141-
and<option>-F</option>have the samemeaning as with the <xref
142-
linkend="app-postmaster">.
144+
<option>-F</option>, and <option>--name</>have the samemeanings as
145+
for the <xreflinkend="app-postmaster">.
143146
</para>
144147

145148
<variablelist>
@@ -163,12 +166,10 @@ Postgres documentation
163166
<para>
164167
Sends all debugging and error output to
165168
<replaceable class="parameter">filename</replaceable>.
166-
If the backend is running under the <application>postmaster</application>,
167-
error messages are still sent to the frontend process as well as to
168-
<replaceable class="parameter">filename</replaceable>,
169-
but debugging output is sent to the controlling tty of the
170-
<application>postmaster</application>
171-
(since only one file descriptor can be sent to an actual file).
169+
If the backend is running under the
170+
<application>postmaster</application>, this option is ignored,
171+
and the stderr inherited from the
172+
<application>postmaster</application> is used.
172173
</para>
173174
</listitem>
174175
</varlistentry>
@@ -177,7 +178,7 @@ Postgres documentation
177178
<term>-P</term>
178179
<listitem>
179180
<para>
180-
Ignore system indexesto scan/update system tuples. The
181+
Ignore system indexeswhile scanning/updating system tuples. The
181182
<command>REINDEX</command> command for system tables/indexes
182183
requires this option to be used.
183184
</para>
@@ -350,6 +351,46 @@ Postgres documentation
350351
</refsect2>
351352
</refsect1>
352353

354+
<refsect1>
355+
<title>Usage</title>
356+
357+
<para>
358+
Start a standalone backend with a command like
359+
<screen>
360+
<userinput>postgres -D $PGDATA <replaceable>other-options</> my_database</userinput>
361+
</screen>
362+
Provide the correct path to the database area with <option>-D</>, or
363+
make sure that the environment variable <envar>PGDATA</> is set.
364+
Also specify the name of the particular database you want to work in.
365+
</para>
366+
367+
<para>
368+
Normally, the standalone backend treats newline as the command
369+
entry terminator; there is no intelligence about semicolons,
370+
as there is in <application>psql</>. To continue a command
371+
across multiple lines, you must type backslash just before each
372+
newline except the last one.
373+
</para>
374+
375+
<para>
376+
But if you use the <option>-N</> command line switch, then newline does
377+
not terminate command entry. The backend will read stdin until EOF, then
378+
process the input as a single query string. Backslash-newline is not
379+
treated specially in this case.
380+
</para>
381+
382+
<para>
383+
The standalone backend does not have readline input processing
384+
(no command history, for example).
385+
</para>
386+
387+
<para>
388+
To quit the backend, type EOF (control-D, usually). If you've
389+
used <option>-N</>, two consecutive EOFs are needed to exit.
390+
</para>
391+
392+
</refsect1>
393+
353394
<refsect1>
354395
<title>See Also</title>
355396

‎doc/src/sgml/ref/postmaster.sgml

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.22 2001/11/25 01:05:37 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.23 2001/11/25 01:11:36 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -36,6 +36,7 @@ Postgres documentation
3636
<arg>-o <replaceable>extra-options</replaceable></arg>
3737
<arg>-p <replaceable>port</replaceable></arg>
3838
<arg>-S</arg>
39+
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
3940
<group><arg>-n</arg><arg>-s</arg></group>
4041
</cmdsynopsis>
4142
</refsynopsisdiv>
@@ -115,12 +116,8 @@ Postgres documentation
115116
Sets a named run-time parameter. Consult the
116117
<citetitle>Administrator's Guide</citetitle> for a list and
117118
descriptions. Most of the other command line options are in
118-
fact short forms of such a parameter assignment.
119-
</para>
120-
121-
<para>
122-
These options may also be specified using the GNU-style long option
123-
format, <option>--name=value</option>.
119+
fact short forms of such a parameter assignment. <option>-c</>
120+
can appear multiple times to set multiple parameters.
124121
</para>
125122
</listitem>
126123
</varlistentry>
@@ -131,7 +128,8 @@ Postgres documentation
131128
<para>
132129
Sets the debug level. The higher this value is set, the more
133130
debugging output is written to the server log. The default is
134-
0, which means no debugging. Values up to 4 make sense.
131+
0, which means no debugging. Values up to 4 are useful; higher
132+
numbers produce no additional output.
135133
</para>
136134
</listitem>
137135
</varlistentry>
@@ -151,8 +149,8 @@ Postgres documentation
151149
<listitem>
152150
<para>
153151
Disables <function>fsync</function> calls for performance
154-
improvement at the risk of data corruption. Read the detailed
155-
documentation before using this!
152+
improvement, at the risk of data corruption in event of a
153+
system crash. Read the detailed documentation before using this!
156154
</para>
157155
</listitem>
158156
</varlistentry>
@@ -209,10 +207,12 @@ Postgres documentation
209207
<para>
210208
Sets the maximum number of client connections that this
211209
<application>postmaster</application> will accept. By
212-
default, this value is 32, but it can be set as high as1024
213-
if yoursystem will support that many processes. (Note that
210+
default, this value is 32, but it can be set as high asyour
211+
system will support. (Note that
214212
<option>-B</option> is required to be at least twice
215-
<option>-N</option>.)
213+
<option>-N</option>. See the <citetitle>Administrator's
214+
Guide</citetitle> for a discussion of system resource requirements
215+
for large numbers of client connections.)
216216
</para>
217217
</listitem>
218218
</varlistentry>
@@ -267,6 +267,15 @@ Postgres documentation
267267
</listitem>
268268
</varlistentry>
269269

270+
<varlistentry>
271+
<term>--<replaceable>name</replaceable>=<replaceable>value</replaceable></term>
272+
<listitem>
273+
<para>
274+
Sets a named run-time parameter; a shorter form of <option>-c</>.
275+
</para>
276+
</listitem>
277+
</varlistentry>
278+
270279
</variablelist>
271280
</para>
272281

@@ -417,7 +426,7 @@ StreamServerPort: cannot bind to port
417426
or <literal>SIGQUIT</literal> can be used. The first will wait for
418427
all clients to terminate before quitting, the second will
419428
forcefully disconnect all clients, and the third will quit
420-
immediately withoutlengthy shutdown, resulting in a recovery run
429+
immediately withoutproper shutdown, resulting in a recovery run
421430
during restart.
422431
</para>
423432

@@ -458,6 +467,26 @@ StreamServerPort: cannot bind to port
458467
<prompt>$</prompt> <userinput>psql</userinput>
459468
</screen>
460469
</para>
470+
471+
<para>
472+
Named runtime parameters can be set in either of these styles:
473+
<screen>
474+
<prompt>$</prompt> <userinput>postmaster -c sort_mem=1234</userinput>
475+
<prompt>$</prompt> <userinput>postmaster --sort-mem=1234</userinput>
476+
</screen>
477+
Either form overrides whatever setting might exist for <literal>sort_mem</>
478+
in <filename>postgresql.conf</>. Notice that underscores in parameter
479+
names can be written as either underscore or dash on the command line.
480+
</para>
481+
482+
<tip>
483+
<para>
484+
Except for short-term experiments,
485+
it's probably better practice to edit the setting in
486+
<filename>postgresql.conf</> than to rely on a command-line switch
487+
to set a parameter.
488+
</para>
489+
</tip>
461490
</refsect1>
462491
</refentry>
463492

‎doc/src/sgml/ref/reindex.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.6 2001/11/2500:18:48 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.7 2001/11/2501:11:36 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -183,8 +183,10 @@ REINDEX
183183
<listitem>
184184
<para>
185185
Be aware that the standalone backend treats newline as the command
186-
entry terminator, not semicolon; you can't continue commands across
187-
lines, as you can in <application>psql</>.
186+
entry terminator; there is no intelligence about semicolons,
187+
as there is in <application>psql</>. To continue a command
188+
across multiple lines, you must type backslash just before each
189+
newline except the last one.
188190
Also, you won't have any of the conveniences of readline processing
189191
(no command history, for example).
190192
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp