mirror of
https://github.com/postgres/postgres.git
synced 2025-06-07 00:02:00 -04:00
Fix erroneous implementation of -s in postmaster.c (the switch doesn't take
an optarg). Add some comments noting that code in three different files has to be kept in sync. Fix erroneous description of -S switch (it sets work_mem not silent_mode), and do some light copy-editing elsewhere in postgres-ref.
This commit is contained in:
parent
f532a22a8f
commit
4fe7a6b51e
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.47 2006/06/18 15:38:36 petere Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.47.2.1 2007/01/04 00:58:01 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -51,15 +51,14 @@ PostgreSQL documentation
|
||||
<option>-D</option> option or the <envar>PGDATA</envar> environment
|
||||
variable; there is no default. Typically, <option>-D</option> or
|
||||
<envar>PGDATA</envar> points directly to the data area directory
|
||||
created by <application>initdb</>. Other possible file layouts are
|
||||
discussed in <xref linkend="runtime-config-file-locations">. A
|
||||
data area is created with <xref linkend="app-initdb">.
|
||||
created by <xref linkend="app-initdb">. Other possible file layouts are
|
||||
discussed in <xref linkend="runtime-config-file-locations">.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default <command>postgres</command> starts in the
|
||||
foreground and prints log messages to the standard error stream. In
|
||||
practical applications the <command>postgres</command>
|
||||
practical applications <command>postgres</command>
|
||||
should be started as a background process, perhaps at boot time.
|
||||
</para>
|
||||
|
||||
@ -67,18 +66,18 @@ PostgreSQL documentation
|
||||
The <command>postgres</command> command can also be called in
|
||||
single-user mode. The primary use for this mode is during
|
||||
bootstrapping by <xref linkend="app-initdb">. Sometimes it is used
|
||||
for debugging or disaster recovery. When invoked in interactive
|
||||
for debugging or disaster recovery (but note that running a single-user
|
||||
server is not truly suitable for debugging the server, since no
|
||||
realistic interprocess communication and locking will happen).
|
||||
When invoked in single-user
|
||||
mode from the shell, the user can enter queries and the results
|
||||
will be printed to the screen, but in a form that is more useful
|
||||
for developers than end users. But note that running a single-user
|
||||
server is not truly suitable for debugging the server since no
|
||||
realistic interprocess communication and locking will happen. When
|
||||
running a stand-alone server, the session user will be set to the
|
||||
user with ID 1. This user does not actually have to exist, so a
|
||||
stand-alone server can be used to manually recover from certain
|
||||
kinds of accidental damage to the system catalogs. Implicit
|
||||
superuser powers are granted to the user with ID 1 in single-user
|
||||
mode.
|
||||
for developers than end users. In the single-user mode,
|
||||
the session user will be set to the user with ID 1, and implicit
|
||||
superuser powers are granted to this user.
|
||||
This user does not actually have to exist, so the single-user mode
|
||||
can be used to manually recover from certain
|
||||
kinds of accidental damage to the system catalogs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -148,7 +147,7 @@ PostgreSQL documentation
|
||||
debugging output is written to the server log. Values are
|
||||
from 1 to 5. It is also possible to pass <literal>-d
|
||||
0</literal> for a specific session, which will prevent the
|
||||
server log level of the <command>postgres</> from being
|
||||
server log level of the parent <command>postgres</> process from being
|
||||
propagated to this session.
|
||||
</para>
|
||||
</listitem>
|
||||
@ -187,11 +186,6 @@ PostgreSQL documentation
|
||||
disabling the <xref linkend="guc-fsync"> configuration
|
||||
parameter. Read the detailed documentation before using this!
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option>--fsync=true</option> has the opposite effect
|
||||
of this option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -206,7 +200,7 @@ PostgreSQL documentation
|
||||
listening on all available interfaces. An empty value
|
||||
specifies not listening on any IP addresses, in which case
|
||||
only Unix-domain sockets can be used to connect to the
|
||||
<command>postgres</command>. Defaults to listening only on
|
||||
server. Defaults to listening only on
|
||||
<systemitem class="systemname">localhost</systemitem>.
|
||||
Specifying this option is equivalent to setting the <xref
|
||||
linkend="guc-listen-addresses"> configuration parameter.
|
||||
@ -262,7 +256,7 @@ PostgreSQL documentation
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the maximum number of client connections that this
|
||||
<command>postgres</command> will accept. By
|
||||
server will accept. By
|
||||
default, this value is 32, but it can be set as high as your
|
||||
system will support. (Note that
|
||||
<option>-B</option> is required to be at least twice
|
||||
@ -281,14 +275,14 @@ PostgreSQL documentation
|
||||
The command line-style options specified in <replaceable
|
||||
class="parameter">extra-options</replaceable> are passed to
|
||||
all server processes started by this
|
||||
<command>postgres</command>. If the option string contains
|
||||
<command>postgres</command> process. If the option string contains
|
||||
any spaces, the entire string must be quoted.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The use of this option is obsolete; all command-line options
|
||||
for server processes can be specified directly on the
|
||||
<command>postgres</command> command line
|
||||
<command>postgres</command> command line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -322,24 +316,13 @@ PostgreSQL documentation
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-S</option></term>
|
||||
<term><option>-S</option> <replaceable class="parameter">work-mem</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies that the <command>postgres</command>
|
||||
process should start up in silent mode. That is, it will
|
||||
disassociate from the user's (controlling) terminal, start its
|
||||
own process group, and redirect its standard output and
|
||||
standard error to <filename>/dev/null</filename>.
|
||||
</para>
|
||||
<para>
|
||||
Using this switch discards all logging output, which is
|
||||
probably not what you want, since it makes it very difficult
|
||||
to troubleshoot problems. See below for a better way to start
|
||||
<command>postgres</command> in the background.
|
||||
</para>
|
||||
<para>
|
||||
<option>--silent-mode=false</option> has the opposite effect
|
||||
of this option.
|
||||
Specifies the amount of memory to be used by internal sorts and hashes
|
||||
before resorting to temporary disk files. See the description of the
|
||||
<varname>work_mem</> configuration parameter in <xref
|
||||
linkend="runtime-config-resource-memory">.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -497,8 +480,8 @@ PostgreSQL documentation
|
||||
<term><option>-y</option> <replaceable class="parameter">database</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates that this is a subprocess started by
|
||||
<command>postgres</command> and specifies the database to
|
||||
Indicates that this is a subprocess started by a parent
|
||||
<command>postgres</command> process, and specifies the database to
|
||||
use. This option is for internal use only.
|
||||
</para>
|
||||
</listitem>
|
||||
@ -795,8 +778,7 @@ PostgreSQL documentation
|
||||
</screen>
|
||||
This command will start up <command>postgres</command>
|
||||
communicating through the port 1234. In order to connect to this
|
||||
<command>postgres</command> using <application>psql</>, you would need to
|
||||
run it as
|
||||
server using <application>psql</>, you would need to run it as
|
||||
<screen>
|
||||
<prompt>$</prompt> <userinput>psql -p 1234</userinput>
|
||||
</screen>
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.105 2006/10/04 00:29:53 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.105.2.1 2007/01/04 00:58:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -258,7 +258,10 @@ startup_hacks(const char *progname)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Help display should match the options accepted by PostmasterMain()
|
||||
* and PostgresMain().
|
||||
*/
|
||||
static void
|
||||
help(const char *progname)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.505 2006/11/30 18:29:12 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.505.2.1 2007/01/04 00:58:01 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -415,6 +415,11 @@ PostmasterMain(int argc, char *argv[])
|
||||
|
||||
opterr = 1;
|
||||
|
||||
/*
|
||||
* Parse command-line options. CAUTION: keep this in sync with
|
||||
* tcop/postgres.c (the option sets should not conflict)
|
||||
* and with the common help() function in main/main.c.
|
||||
*/
|
||||
while ((opt = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:W:-:")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
@ -513,7 +518,7 @@ PostmasterMain(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 's':
|
||||
SetConfigOption("log_statement_stats", optarg, PGC_POSTMASTER, PGC_S_ARGV);
|
||||
SetConfigOption("log_statement_stats", "true", PGC_POSTMASTER, PGC_S_ARGV);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.518 2006/11/21 20:59:52 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.518.2.1 2007/01/04 00:58:01 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@ -2757,6 +2757,11 @@ PostgresMain(int argc, char *argv[], const char *username)
|
||||
ctx = PGC_POSTMASTER;
|
||||
gucsource = PGC_S_ARGV; /* initial switches came from command line */
|
||||
|
||||
/*
|
||||
* Parse command-line options. CAUTION: keep this in sync with
|
||||
* postmaster/postmaster.c (the option sets should not conflict)
|
||||
* and with the common help() function in main/main.c.
|
||||
*/
|
||||
while ((flag = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:v:W:y:-:")) != -1)
|
||||
{
|
||||
switch (flag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user