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
|
<!-- manual page source format generated by PolyglotMan v3.0.4, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
<HTML>
<HEAD>
<TITLE>POSTGRESQL(UNIX) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="pgsql.html">PostgreSQL Contents</A>
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
postgres - the Postgres backend server
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS </A></H2>
<B>postgres</B> [<B>-B</B> n_buffers]
[<B>-D</B> data_directory] [<B>-E</B> ] [<B>-F</B> ] <BR>
[<B>-P</B> filedes] [<B>-Q</B> ] [<B>-S n_buffers</B> ] [<B>-e</B> ] [<B>-v
protocol</B> ] <BR>
[<B>-d</B> debug_level] [<B>-o</B> output_file] [<B>-s</B> ] [dbname]
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION
</A></H2>
The Postgres backend server can be executed directly from the user shell.
This should be done only while debugging by the DBA, and should not be
done while other Postgres backends are being managed by a <I>postmaster</I> on
this set of databases. <P>
The optional argument <I>dbname</I> specifies the name
of the database to be accessed. <I>Dbname</I> defaults to the value of the <FONT SIZE=-1>USER</FONT>
environment variable. <P>
The <I>postgres</I> server understands the following command-line
options:
<DL>
<DT><B>-D</B> data_directory </DT>
<DD>This option specifies the pathname of the directory
that contains the database system data (the tables, the catalogs, etc.).
If you don't specify this option, Postgres uses the value of the PGDATA
environment variable. You must either specify a -D option or set PGDATA.
The data directory pathname for a database system is normally determined
when the database system is created with <I>initdb</I>, with a --pgdata option
to <I>initdb</I>. </DD>
<DT><B>-B</B> n_buffers </DT>
<DD>If the backend is running under the <I>postmaster</I>,
<I>n_buffers</I> is the number of shared-memory buffers that the <I>postmaster</I> has
allocated for the backend server processes that it starts. If the backend
is running standalone, this specifies the number of buffers to allocate.
This value defaults to 64, and each buffer is 8k bytes. </DD>
<DT><B>-E</B> </DT>
<DD>Echo all queries.
</DD>
<DT><B>-F</B> </DT>
<DD>Disable automatic fsync() call after each transaction. This option improves
performance, but an operating system crash while a transaction is in progress
will probably cause data loss. </DD>
<DT><B>-P</B> filedes </DT>
<DD><I>filedes</I> specifies the file descriptor
that corresponds to the socket (port) on which to communicate to the frontend
process. This option is <B>not</B> useful for interactive use. </DD>
<DT><B>-Q</B> </DT>
<DD>Specifies `quiet'
mode. </DD>
<DT><B>-S</B> </DT>
<DD>Specifies the amount of memory to be used by internal sorts before
using disk files for sorting. This value is specified in 1k bytes, and
defaults to 512. </DD>
<DT><B>-e</B> </DT>
<DD>The <I>-e</I> option controls how dates are input to and output
from the database. </DD>
<DT>If the </DT>
<DD><I>-e</I> option is supplied, then all dates passed
to and from the frontend processes will be assumed to be in <I>European</I> format
ie. <I>DD-MM-YYYY</I> otherwise dates are input and output in <I>American</I> format ie.
<I>MM-DD-YYYY</I> </DD>
<DT><B>-d</B> debug_level </DT>
<DD>Turns on debugging at the numeric level <I>debug_level</I>.
Turning on debugging will cause query, parse trees, and query plans to
be displayed. </DD>
<DT><B>-o</B> output_file </DT>
<DD>Sends all debugging and error output to <I>output_file</I>.
If the backend is running under the <I>postmaster</I>, error messages are still
sent to the frontend process as well as to <I>output_file</I>, but debugging
output is sent to the controlling tty of the <I>postmaster</I> (since only one
file descriptor can be sent to an actual file). </DD>
<DT><B>-s</B> </DT>
<DD>Print time information
and other statistics at the end of each query. This is useful for benchmarking
or for use in tuning the number of buffers. </DD>
<DT><B>-v</B> protocol </DT>
<DD>Specifies the number
of the frontend/backend protocol to be used for this particular session.
</DD>
</DL>
<H2><A NAME="sect3" HREF="#toc3">DEPRECATED COMMAND OPTIONS </A></H2>
There are several other options that may be
specified, used mainly for debugging purposes. These are listed here only
for the use by Postgres system developers. <B>Use of any of these options
is highly discouraged</B>. Furthermore, any of these options may disappear
or change at any time.
<DL>
<DT><B>-A</B>n|r|b|Q<I>n </I>|X<I>n </I> </DT>
<DD></DD>
<DT>This option generates a tremendous amount
of output. </DT>
<DD></DD>
<DT><B>-L</B> </DT>
<DD>Turns off the locking system. </DD>
<DT><B>-N</B> </DT>
<DD>Disables use of newline
as a query delimiter. </DD>
<DT><B>-b</B> </DT>
<DD>Enables generation of bushy query plan trees (as
opposed to left-deep query plans trees). These query plans are not intended
for actual execution; in addition, this flag often causes Postgres to
run out of memory. </DD>
<DT><B>-f</B> </DT>
<DD>Forbids the use of particular scan and join methods:
<I>s</I> and <I>i</I> disable sequential and index scans respectively, while <I>n</I>, <I>m</I> and
<I>h</I> disable nested-loop, merge and hash joins respectively. This is another
feature that may not necessarily produce executable plans. </DD>
<DT><B>-p</B> </DT>
<DD>Indicates
to the backend server that it has been started by a <I>postmaster</I> and make
different assumptions about buffer pool management, file descriptors,
etc. </DD>
<DT><B>-t</B>pa[rser]|pl[anner]|e[xecutor] </DT>
<DD>Print timing statistics for each query
relating to each of the major system modules. This option cannot be used
with <B>-s</B>. </DD>
</DL>
<H2><A NAME="sect4" HREF="#toc4">SEE ALSO </A></H2>
<A HREF="ipcclean.1.html">ipcclean(1)</A>
, <A HREF="psql.1.html">psql(1)</A>
, <A HREF="postmaster.1.html">postmaster(1)</A>
.
<H2><A NAME="sect5" HREF="#toc5">DIAGNOSTICS </A></H2>
Of
the nigh-infinite number of error messages you may see when you execute
the backend server directly, the most common will probably be:
<DL>
<DT><B>semget:
No space left on device</B> </DT>
<DD>If you see this message, you should run the <I>ipcclean</I>
command. After doing this, try starting <I>postgres</I> again. If this still
doesn't work, you probably need to configure your kernel for shared memory
and semaphores as described in the installation notes. </DD>
</DL>
<P>
<HR><P>
<A NAME="toc"><B>Table of Contents</B></A><P>
<UL>
<LI><A NAME="toc0" HREF="#sect0">NAME</A></LI>
<LI><A NAME="toc1" HREF="#sect1">SYNOPSIS</A></LI>
<LI><A NAME="toc2" HREF="#sect2">DESCRIPTION</A></LI>
<LI><A NAME="toc3" HREF="#sect3">DEPRECATED COMMAND OPTIONS</A></LI>
<LI><A NAME="toc4" HREF="#sect4">SEE ALSO</A></LI>
<LI><A NAME="toc5" HREF="#sect5">DIAGNOSTICS</A></LI>
</UL>
</BODY></HTML>
|