1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2003-03-24 15:32:51 +01:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.31 2003/03/24 14:32:51 petere Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-05-27 17:49:15 +02:00
|
|
|
<refentry id="APP-POSTGRES">
|
|
|
|
<refmeta>
|
2000-11-14 19:11:32 +01:00
|
|
|
<refentrytitle id="APP-POSTGRES-TITLE"><application>postgres</application></refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
1999-05-27 17:49:15 +02:00
|
|
|
<refmiscinfo>Application</refmiscinfo>
|
|
|
|
</refmeta>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
1999-05-27 17:49:15 +02:00
|
|
|
<refnamediv>
|
2000-11-14 19:11:32 +01:00
|
|
|
<refname>postgres</refname>
|
2001-09-03 14:57:50 +02:00
|
|
|
<refpurpose>run a <productname>PostgreSQL</productname> server in single-user mode</refpurpose>
|
1999-05-27 17:49:15 +02:00
|
|
|
</refnamediv>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
1999-05-27 17:49:15 +02:00
|
|
|
<refsynopsisdiv>
|
2000-11-14 19:11:32 +01:00
|
|
|
<cmdsynopsis>
|
|
|
|
<!-- standalone call -->
|
|
|
|
<command>postgres</command>
|
|
|
|
<arg>-A <group choice="plain"><arg>0</arg><arg>1</arg></group></arg>
|
|
|
|
<arg>-B <replaceable>nbuffers</replaceable></arg>
|
|
|
|
<arg>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
|
|
|
<arg>-d <replaceable>debug-level</replaceable></arg>
|
|
|
|
<arg>-D <replaceable>datadir</replaceable></arg>
|
|
|
|
<arg>-e</arg>
|
|
|
|
<arg>-E</arg>
|
|
|
|
<arg>-f<group choice="plain"><arg>s</arg><arg>i</arg><arg>t</arg><arg>n</arg><arg>m</arg><arg>h</arg></group></arg>
|
|
|
|
<arg>-F</arg>
|
|
|
|
<arg>-i</arg>
|
|
|
|
<arg>-N</arg>
|
2001-09-08 17:24:00 +02:00
|
|
|
<arg>-o <replaceable>filename</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<arg>-O</arg>
|
|
|
|
<arg>-P</arg>
|
|
|
|
<group>
|
|
|
|
<arg>-s</arg>
|
|
|
|
<arg>-t<group choice="plain"><arg>pa</arg><arg>pl</arg><arg>ex</arg></group></arg>
|
|
|
|
</group>
|
|
|
|
<arg>-S <replaceable>sort-mem</replaceable></arg>
|
|
|
|
<arg>-W <replaceable>seconds</replaceable></arg>
|
2001-11-25 02:11:36 +01:00
|
|
|
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<arg choice="plain"><replaceable>database</replaceable></arg>
|
|
|
|
<sbr>
|
|
|
|
<!-- postmaster fork -->
|
|
|
|
<command>postgres</command>
|
|
|
|
<arg>-A <group choice="plain"><arg>0</arg><arg>1</arg></group></arg>
|
|
|
|
<arg>-B <replaceable>nbuffers</replaceable></arg>
|
|
|
|
<arg>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
|
|
|
<arg>-d <replaceable>debug-level</replaceable></arg>
|
|
|
|
<arg>-D <replaceable>datadir</replaceable></arg>
|
|
|
|
<arg>-e</arg>
|
|
|
|
<arg>-f<group choice="plain"><arg>s</arg><arg>i</arg><arg>t</arg><arg>n</arg><arg>m</arg><arg>h</arg></group></arg>
|
|
|
|
<arg>-F</arg>
|
|
|
|
<arg>-i</arg>
|
2001-09-08 17:24:00 +02:00
|
|
|
<arg>-o <replaceable>filename</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<arg>-O</arg>
|
|
|
|
<arg>-p <replaceable>database</replaceable></arg>
|
|
|
|
<arg>-P</arg>
|
|
|
|
<group>
|
|
|
|
<arg>-s</arg>
|
|
|
|
<arg>-t<group choice="plain"><arg>pa</arg><arg>pl</arg><arg>ex</arg></group></arg>
|
|
|
|
</group>
|
|
|
|
<arg>-S <replaceable>sort-mem</replaceable></arg>
|
2003-03-24 15:32:51 +01:00
|
|
|
<arg>-v <replaceable>protocol</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<arg>-W <replaceable>seconds</replaceable></arg>
|
2001-11-25 02:11:36 +01:00
|
|
|
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
The <command>postgres</command> executable is the actual
|
2000-11-14 19:11:32 +01:00
|
|
|
<productname>PostgreSQL</productname> server process that processes
|
2001-03-17 17:27:31 +01:00
|
|
|
queries. It is normally not called directly; instead a <xref
|
2002-03-22 20:20:45 +01:00
|
|
|
linkend="app-postmaster"> multiuser server is started.
|
2001-03-17 17:27:31 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The second form above is how
|
2003-03-24 15:32:51 +01:00
|
|
|
<command>postgres</command> is invoked by the <xref
|
2000-12-26 00:15:27 +01:00
|
|
|
linkend="app-postmaster"> (only
|
2000-11-14 19:11:32 +01:00
|
|
|
conceptually, since both <filename>postmaster</filename> and
|
|
|
|
<filename>postgres</filename> are in fact the same program); it
|
|
|
|
should not be invoked directly this way. The first form invokes
|
2001-11-25 02:11:36 +01:00
|
|
|
the server directly in interactive 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.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
|
|
|
When invoked in interactive 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
|
2003-03-24 15:32:51 +01:00
|
|
|
that running a single-user server is not truly suitable for
|
2001-11-28 21:49:10 +01:00
|
|
|
debugging the server since no realistic interprocess communication
|
2000-11-14 19:11:32 +01:00
|
|
|
and locking will happen.
|
|
|
|
</para>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
When running a stand-alone server, the session user will be set to
|
2002-10-12 01:03:48 +02:00
|
|
|
the user with ID 1. This user does not actually have to exist, so
|
2003-03-24 15:32:51 +01:00
|
|
|
a stand-alone server can be used to manually recover from certain
|
2001-09-08 17:24:00 +02:00
|
|
|
kinds of accidental damage to the system catalogs. Implicit
|
2002-10-12 01:03:48 +02:00
|
|
|
superuser powers are granted to the user with ID 1 in stand-alone
|
2001-09-08 17:24:00 +02:00
|
|
|
mode.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
2002-10-12 01:03:48 +02:00
|
|
|
</refsect1>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2002-10-12 01:03:48 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Options</title>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
When <command>postgres</command> is started by a <xref
|
2000-12-26 00:15:27 +01:00
|
|
|
linkend="app-postmaster"> then it
|
2000-11-14 19:11:32 +01:00
|
|
|
inherits all options set by the latter. Additionally,
|
2003-03-24 15:32:51 +01:00
|
|
|
<command>postgres</command>-specific options can be passed
|
|
|
|
from the <command>postmaster</command> with the
|
2000-11-14 19:11:32 +01:00
|
|
|
<option>-o</option> switch.
|
|
|
|
</para>
|
2000-05-03 09:33:44 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
|
|
|
You can avoid having to type these options by setting up a
|
2003-01-19 01:13:31 +01:00
|
|
|
configuration file. See the &cite-admin; for details. Some
|
|
|
|
(safe) options can also be set from the connecting client in an
|
|
|
|
application-dependent way. For example, if the environment
|
|
|
|
variable <envar>PGOPTIONS</envar> is set, then
|
|
|
|
<application>libpq</>-based clients will pass that string to the
|
2000-11-14 19:11:32 +01:00
|
|
|
server, which will interpret it as
|
2003-03-24 15:32:51 +01:00
|
|
|
<command>postgres</command> command-line options.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2002-10-12 01:03:48 +02:00
|
|
|
<refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
<title>General Purpose</title>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<para>
|
|
|
|
The options <option>-A</option>, <option>-B</option>,
|
|
|
|
<option>-c</option>, <option>-d</option>, <option>-D</option>,
|
2003-03-24 15:32:51 +01:00
|
|
|
<option>-F</option>, and <option>--<replaceable>name</></option> have the same meanings
|
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-02 22:39:36 +01:00
|
|
|
as the <xref linkend="app-postmaster"> except that
|
2003-03-24 15:32:51 +01:00
|
|
|
<literal>-d 0</> prevents the server log level of
|
|
|
|
the <command>postmaster</> from being propagated to <command>postgres</>.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<variablelist>
|
1999-05-27 17:49:15 +02:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-e</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Sets the default date style to <quote>European</quote>, which
|
|
|
|
means that the <quote>day before month</quote> (rather than
|
|
|
|
month before day) rule is used to interpret ambiguous date
|
|
|
|
input, and that the day is printed before the month in certain
|
2003-01-19 01:13:31 +01:00
|
|
|
date output formats. See the &cite-user; for more information.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-o</option> <replaceable class="parameter">filename</replaceable></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Send all server log output to
|
2001-09-08 17:24:00 +02:00
|
|
|
<replaceable class="parameter">filename</replaceable>.
|
2003-03-24 15:32:51 +01:00
|
|
|
If <command>postgres</command> is running under the
|
|
|
|
<command>postmaster</command>, this option is ignored,
|
2002-03-22 20:20:45 +01:00
|
|
|
and the <systemitem>stderr</> inherited from the
|
2003-03-24 15:32:51 +01:00
|
|
|
<command>postmaster</command> is used.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-P</option></term>
|
2000-11-14 19:11:32 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Ignore system indexes while scanning/updating system tables. The
|
2000-11-14 19:11:32 +01:00
|
|
|
<command>REINDEX</command> command for system tables/indexes
|
|
|
|
requires this option to be used.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
1999-05-27 17:49:15 +02:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-s</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Print time information and other statistics at the end of each command.
|
1999-05-27 17:49:15 +02:00
|
|
|
This is useful for benchmarking or for use in tuning the number of
|
|
|
|
buffers.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-S</option> <replaceable class="parameter">sort-mem</replaceable></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Specifies the amount of memory to be used by internal sorts and hashes
|
|
|
|
before resorting to temporary disk files. The value is specified in
|
2003-03-24 15:32:51 +01:00
|
|
|
kilobytes, and defaults to 1024. Note that for a complex query,
|
2000-11-14 19:11:32 +01:00
|
|
|
several sorts and/or hashes might be running in parallel, and each one
|
|
|
|
will be allowed to use as much as
|
|
|
|
<replaceable class="parameter">sort-mem</replaceable> kilobytes
|
|
|
|
before it starts to put data into temporary files.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
</variablelist>
|
2002-10-12 01:03:48 +02:00
|
|
|
</refsect2>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2002-10-12 01:03:48 +02:00
|
|
|
<refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
<title>Options for stand-alone mode</title>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term><replaceable class="parameter">database</replaceable></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Specifies the name of the database to be accessed. If it is
|
|
|
|
omitted it defaults to the user name.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
2000-11-14 19:11:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-E</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Echo all commands.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-N</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Disables use of newline as a statement delimiter.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
</variablelist>
|
2002-10-12 01:03:48 +02:00
|
|
|
</refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
2002-10-12 01:03:48 +02:00
|
|
|
<refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
<title>Semi-internal Options</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There are several other options that may be specified, used
|
|
|
|
mainly for debugging purposes. These are listed here only for
|
|
|
|
the use by <productname>PostgreSQL</productname> system
|
|
|
|
developers. <emphasis>Use of any of these options is highly
|
|
|
|
discouraged.</emphasis> Furthermore, any of these options may
|
|
|
|
disappear or change in a future release without notice.
|
|
|
|
</para>
|
|
|
|
<variablelist>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-f</option> <literal>{ s | i | m | n | h }</literal></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Forbids the use of particular scan and join methods:
|
|
|
|
<literal>s</literal> and <literal>i</literal>
|
|
|
|
disable sequential and index scans respectively, while
|
|
|
|
<literal>n</literal>, <literal>m</literal>, and <literal>h</literal>
|
|
|
|
disable nested-loop, merge and hash joins respectively.
|
2003-03-24 15:32:51 +01:00
|
|
|
</para>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Neither sequential scans nor nested-loop joins can be disabled completely;
|
|
|
|
the <literal>-fs</literal> and <literal>-fn</literal>
|
|
|
|
options simply discourage the optimizer from using those
|
|
|
|
plan types if it has any other alternative.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-i</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Prevents query execution, but shows the plan tree.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-O</option></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Allows the structure of system tables to be modified. This is
|
2003-03-24 15:32:51 +01:00
|
|
|
used by <command>initdb</command>.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-p</option> <replaceable class="parameter">database</replaceable></term>
|
2000-11-14 19:11:32 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Indicates that this process has been started by a
|
|
|
|
<command>postmaster</command> and specifies the database to use.
|
2000-11-14 19:11:32 +01:00
|
|
|
etc.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-t</option> <literal>pa[rser] | pl[anner] | e[xecutor]</literal></term>
|
1999-05-27 17:49:15 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Print timing statistics for each query relating to each of the
|
|
|
|
major system modules. This option cannot be used together
|
|
|
|
with the <option>-s</option> option.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-v</option> <replaceable class="parameter">protocol</replaceable></term>
|
2000-11-14 19:11:32 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specifies the version number of the frontend/backend protocol
|
|
|
|
to be used for this particular session.
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<varlistentry>
|
2002-03-22 20:20:45 +01:00
|
|
|
<term><option>-W</option> <replaceable class="parameter">seconds</replaceable></term>
|
2000-11-14 19:11:32 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
As soon as this option is encountered, the process sleeps for
|
|
|
|
the specified amount of seconds. This gives developers time
|
2003-03-24 15:32:51 +01:00
|
|
|
to attach a debugger to the server process.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
</variablelist>
|
2002-10-12 01:03:48 +02:00
|
|
|
</refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
</refsect1>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
2001-11-25 02:11:36 +01:00
|
|
|
<refsect1>
|
2002-07-28 17:22:21 +02:00
|
|
|
<title>Environment</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><envar>PGDATA</envar></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Default data direction location
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
For others, which have little influence during single-user mode,
|
|
|
|
see <xref linkend="app-postmaster">.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
2002-10-24 01:33:08 +02:00
|
|
|
<title>Notes</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To stop a running query use the <literal>SIGINT</literal> signal. To
|
2003-03-24 15:32:51 +01:00
|
|
|
tell <command>postgres</command> to reread the configuration file,
|
2002-10-24 01:33:08 +02:00
|
|
|
use a <literal>SIGHUP</literal> signal. The
|
2003-03-24 15:32:51 +01:00
|
|
|
<command>postmaster</command> uses <literal>SIGTERM</literal>
|
|
|
|
to tell a <command>postgres</command> process to quit normally and
|
2002-10-24 01:33:08 +02:00
|
|
|
<literal>SIGQUIT</literal> to terminate without the normal cleanup.
|
|
|
|
These <emphasis>should not</emphasis> be used by users.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
2001-11-25 02:11:36 +01:00
|
|
|
<title>Usage</title>
|
|
|
|
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Start a stand-alone server with a command like
|
2001-11-25 02:11:36 +01:00
|
|
|
<screen>
|
2003-03-24 15:32:51 +01:00
|
|
|
<userinput>postgres -D /usr/local/pgsql/data <replaceable>other-options</> my_database</userinput>
|
2001-11-25 02:11:36 +01:00
|
|
|
</screen>
|
2003-03-24 15:32:51 +01:00
|
|
|
Provide the correct path to the database directory with <option>-D</>, or
|
2001-11-25 02:11:36 +01:00
|
|
|
make sure that the environment variable <envar>PGDATA</> is set.
|
|
|
|
Also specify the name of the particular database you want to work in.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Normally, the stand-alone server treats newline as the command
|
2001-11-25 02:11:36 +01:00
|
|
|
entry terminator; there is no intelligence about semicolons,
|
|
|
|
as there is in <application>psql</>. To continue a command
|
|
|
|
across multiple lines, you must type backslash just before each
|
|
|
|
newline except the last one.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
But if you use the <option>-N</> command line switch, then newline does
|
2003-03-24 15:32:51 +01:00
|
|
|
not terminate command entry. In this case, the server will read the standard input
|
2002-03-22 20:20:45 +01:00
|
|
|
until the end-of-file (<acronym>EOF</>) marker, then
|
2003-03-24 15:32:51 +01:00
|
|
|
process the input as a single command string. Backslash-newline is not
|
2001-11-25 02:11:36 +01:00
|
|
|
treated specially in this case.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2002-03-22 20:20:45 +01:00
|
|
|
To quit the session, type <acronym>EOF</acronym>
|
2001-11-28 21:49:10 +01:00
|
|
|
(<keycombo action="simul"><keycap>Control</><keycap>D</></>, usually).
|
|
|
|
If you've
|
2002-03-22 20:20:45 +01:00
|
|
|
used <option>-N</>, two consecutive <acronym>EOF</>s are needed to exit.
|
2001-11-25 02:11:36 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2003-03-24 15:32:51 +01:00
|
|
|
Note that the stand-alone server does not provide sophisticated
|
2001-11-28 21:49:10 +01:00
|
|
|
line-editing features (no command history, for example).
|
2001-11-25 02:11:36 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<refsect1>
|
2001-09-08 17:24:00 +02:00
|
|
|
<title>See Also</title>
|
1999-05-27 17:49:15 +02:00
|
|
|
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
<xref linkend="app-initdb">,
|
|
|
|
<xref linkend="app-ipcclean">,
|
|
|
|
<xref linkend="app-postmaster">
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|