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

Commitff8bf5a

Browse files
author
Thomas G. Lockhart
committed
First copy from the man pages.
postgres-ref.sgml is not yet marked up.
1 parentfe2bcf8 commitff8bf5a

File tree

2 files changed

+720
-0
lines changed

2 files changed

+720
-0
lines changed

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

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
.\" This is -*-nroff-*-
2+
.\" XXX standard disclaimer belongs here....
3+
.\" $Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.1 1999/05/26 17:25:38 thomas Exp $
4+
.TH POSTGRESQL UNIX 05/19/99 PostgreSQL PostgreSQL
5+
.SH NAME
6+
postgres - the Postgres backend server
7+
.SH SYNOPSIS
8+
.BR"postgres"
9+
[\c
10+
.BR"-B"
11+
n_buffers]
12+
[\c
13+
.BR"-C"
14+
]
15+
[\c
16+
.BR"-D"
17+
data_directory]
18+
[\c
19+
.BR"-E"
20+
]
21+
[\c
22+
.BR"-F"
23+
]
24+
[\c
25+
.BR"-O"
26+
]
27+
[\c
28+
.BR"-Q"
29+
]
30+
[\c
31+
.BR"-S kbytes"
32+
]
33+
[\c
34+
.BR"-d"
35+
debug_level]
36+
[\c
37+
.BR"-e"
38+
]
39+
[\c
40+
.BR"-o"
41+
output_file]
42+
[\c
43+
.BR"-s"
44+
]
45+
[\c
46+
.BR"-v protocol"
47+
]
48+
[dbname]
49+
.in-5n
50+
.SH DESCRIPTION
51+
The Postgres backend server can be executed directly from the user shell.
52+
This should be done only while debugging by the DBA, and should not be
53+
done while other Postgres backends are being managed by a
54+
.IR postmaster
55+
on this set of databases.
56+
.PP
57+
Some of the switches explained in this man page can be passed to the backend
58+
through the "database options" field of a connection request, and thus can be
59+
set for a particular backend without going to the trouble of restarting the
60+
postmaster. This is particularly handy for debugging-related switches.
61+
.PP
62+
The optional argument
63+
.IR dbname
64+
specifies the name of the database to be accessed.
65+
.IR Dbname
66+
defaults to the value of the
67+
.SMUSER
68+
environment variable.
69+
.PP
70+
The
71+
.IR postgres
72+
server understands the following command-line options:
73+
.TP
74+
.BR"-B"" n_buffers"
75+
If the backend is running under the
76+
.IR postmaster,
77+
.IR"n_buffers"
78+
is the number of shared-memory buffers that the
79+
.IR"postmaster"
80+
has allocated for the backend server processes that it starts. If the
81+
backend is running standalone, this specifies the number of buffers to
82+
allocate. This value defaults to 64 buffers, where each buffer is 8k bytes
83+
(or whatever BLCKSZ is set to in config.h).
84+
.TP
85+
.BR"-C"
86+
Do not show server version number.
87+
.TP
88+
.BR"-D"" data_directory"
89+
This option specifies the pathname of the directory that contains the
90+
database system data (the tables, the catalogs, etc.). If you don't
91+
specify this option, Postgres uses the value of the PGDATA environment
92+
variable. You must either specify a -D option or set PGDATA.
93+
94+
The data directory pathname for a database system is normally determined when
95+
the database system is created with
96+
.IR initdb,
97+
with a --pgdata option to
98+
.IR initdb.
99+
.TP
100+
.BR"-E"
101+
Echo all queries.
102+
.TP
103+
.BR"-F"
104+
Disable automatic fsync() call after each transaction.
105+
This option improves performance, but an operating system crash
106+
while a transaction is in progress will probably cause data loss.
107+
.TP
108+
.BR"-O"
109+
Override restrictions, so system table structures can be modified(pg_*).
110+
.TP
111+
.BR"-Q"
112+
Specifies\*(lqquiet\*(rq mode.
113+
.TP
114+
.BR"-S"" kbytes"
115+
Specifies the amount of memory to be used by internal sorts and hashes
116+
before resorting to temporary disk files. The value is specified in
117+
kilobytes, and defaults to 512 kilobytes. Note that for a complex query,
118+
several sorts and/or hashes might be running in parallel, and each one
119+
will be allowed to use as much as -S kilobytes before it starts to put
120+
data into temporary files.
121+
.TP
122+
.BR"-e"
123+
The
124+
.IR"-e"
125+
option controls how dates are input to and output from the database.
126+
.IP
127+
If the
128+
.IR"-e"
129+
option is supplied, then all dates passed to and from the frontend
130+
processes will be assumed to be in
131+
.IR"European"
132+
format ie.
133+
.IR"DD-MM-YYYY"
134+
otherwise dates are input and output in
135+
.IR"American"
136+
format ie.
137+
.IR"MM-DD-YYYY"
138+
.TP
139+
.BR"-d"" debug_level"
140+
Turns on debugging at the numeric level
141+
.IR"debug_level".
142+
Turning on debugging will cause query, parse trees, and query plans to
143+
be displayed.
144+
.TP
145+
.BR"-o"" output_file"
146+
Sends all debugging and error output to
147+
.IR output_file.
148+
If the backend is running under the
149+
.IR postmaster,
150+
error messages are still sent to the frontend process as well as to
151+
.IR output_file,
152+
but debugging output is sent to the controlling tty of the
153+
.IR postmaster
154+
(since only one file descriptor can be sent to an actual file).
155+
.TP
156+
.BR"-s"
157+
Print time information and other statistics at the end of each query.
158+
This is useful for benchmarking or for use in tuning the number of
159+
buffers.
160+
.TP
161+
.BR"-v"" protocol"
162+
Specifies the number of the frontend/backend protocol to be used for this
163+
particular session.
164+
.SH "DEVELOPER COMMAND OPTIONS"
165+
There are several other options that may be specified, used mainly
166+
for debugging purposes. These are listed here only for the use by
167+
Postgres system developers.
168+
.BR"Use of any of these options is highly discouraged".
169+
Furthermore, any of these options may disappear or change at any time.
170+
.TP
171+
.BR"-A""n|r|b|Q\fIn\fP|X\fIn\fP"
172+
.IP
173+
This option generates a tremendous amount of output.
174+
.TP
175+
.BR"-L"
176+
Turns off the locking system.
177+
.TP
178+
.BR"-N"
179+
Disables use of newline as a query delimiter.
180+
.TP
181+
.BR"-f"
182+
Forbids the use of particular scan and join methods:
183+
.IR s" and" i
184+
disable sequential and index scans respectively, while
185+
.IR n"," m" and" h
186+
disable nested-loop, merge and hash joins respectively.
187+
(Neither sequential scans nor nested-loop joins can be disabled completely;
188+
the -fs and -fn options simply discourage the optimizer from using those
189+
plan types if it has any other alternative.)
190+
.TP
191+
.BR"-i"
192+
Prevents query execution, but shows the plan tree.
193+
.TP
194+
.BR"-p"" databasename"
195+
Indicates to the backend server that it has been started by a
196+
.IR postmaster
197+
and make different assumptions about buffer pool management, file
198+
descriptors, etc. Switches following -p are restricted to those
199+
considered "secure".
200+
.TP
201+
.BR"-t""pa[rser]|pl[anner]|e[xecutor]"
202+
Print timing statistics for each query relating to each of the major
203+
system modules. This option cannot be used with
204+
.BR"-s".
205+
.SH "SEE ALSO"
206+
ipcclean(1),
207+
psql(1),
208+
postmaster(1).
209+
.SH "DIAGNOSTICS"
210+
Of the nigh-infinite number of error messages you may see when you
211+
execute the backend server directly, the most common will probably be:
212+
.TP
213+
.BR"semget: No space left on device"
214+
If you see this message, you should run the
215+
.IR ipcclean
216+
command. After doing this, try starting
217+
.IR postgres
218+
again. If this still doesn't work, you probably need to configure
219+
your kernel for shared memory and semaphores as described in the
220+
installation notes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp