]> granicus.if.org Git - postgresql/blob - src/man/postgres.1
Bring in a patch from Keith Parks to move the use of European dates
[postgresql] / src / man / postgres.1
1 .\" This is -*-nroff-*-
2 .\" XXX standard disclaimer belongs here....
3 .\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.5 1997/01/26 15:32:20 scrappy Exp $
4 .TH POSTGRES95 UNIX 12/08/96 Postgres95 Postgres95
5 .SH NAME
6 postgres \(em the Postgres backend server
7 .SH SYNOPSIS
8 .BR "postgres"
9 [\c
10 .BR "-B"
11 n_buffers]
12 [\c
13 .BR "-D"
14 data_directory]
15 [\c
16 .BR "-E"
17 ]
18 [\c
19 .BR "-F"
20 ]
21 .br
22 [\c
23 .BR "-P"
24 filedes]
25 [\c
26 .BR "-Q"
27 ]
28 [\c
29 .BR "-e"
30 ]
31 .br
32 [\c
33 .BR "-d"
34 debug_level]
35 [\c
36 .BR "-o"
37 output_file]
38 [\c
39 .BR "-s"
40 ]
41 [dbname]
42 .in -5n
43 .SH DESCRIPTION
44 The Postgres backend server can be executed directly from the user shell.
45 This should be done only while debugging by the DBA, and should not be
46 done while other Postgres backends are being managed by a
47 .IR postmaster
48 on this set of databases.
49 .PP
50 The optional argument
51 .IR dbname
52 specifies the name of the database to be accessed.
53 .IR Dbname
54 defaults to the value of the
55 .SM USER
56 environment variable.
57 .PP
58 The 
59 .IR postgres
60 server understands the following command-line options:
61 .TP 5n
62 .BR "-D" " data_directory"
63 This option specifies the pathname of the directory that contains the
64 database system data (the tables, the catalogs, etc.).  If you don't 
65 specify this option, Postgres uses the value of the PGDATA environment
66 variable.  You must either specify a -D option or set PGDATA.
67  
68 The data directory pathname for a database system is normally determined when
69 the database system is created with
70 .IR initdb ,
71 with a --pgdata option to
72 .IR initdb .
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.
83 .TP
84 .BR "-F"
85 Disable automatic fsync() call after each transaction.
86 This option improves performance, but an operating system crash
87 while a transaction is in progress will probably cause data loss.
88 .TP
89 .BR "-P" " filedes"
90 .IR "filedes"
91 specifies the file descriptor that corresponds to the socket (port) on
92 which to communicate to the frontend process.  This option is 
93 .BR not
94 useful for interactive use.
95 .TP
96 .BR "-Q"
97 Specifies \*(lqquiet\*(rq mode.
98 .TP
99 .BR "-E"
100 Echo all queries.
101 .TP
102 .BR "-e"
103 The
104 .IR "-e"
105 option controls how dates are input to and output from the database.
106 .IP
107 If the
108 .IR "-e"
109 option is supplied, then all dates passed to and from the frontend
110 processes will be assumed to be in
111 .IR "European"
112 format ie.
113 .IR "DD-MM-YYYY"
114 otherwise dates are input and output in
115 .IR "American"
116 format ie.
117 .IR "MM-DD-YYYY"
118 .TP
119 .BR "-d" " debug_level"
120 Turns on debugging at the numeric level
121 .IR "debug_level" .
122 Turning on debugging will cause query, parse trees, and query plans to
123 be displayed.
124 .TP
125 .BR "-o" " output_file"
126 Sends all debugging and error output to 
127 .IR output_file .
128 If the backend is running under the 
129 .IR postmaster ,
130 error messages are still sent to the frontend process as well as to
131 .IR output_file ,
132 but debugging output is sent to the controlling tty of the
133 .IR postmaster
134 (since only one file descriptor can be sent to an actual file).
135 .TP
136 .BR "-s"
137 Print time information and other statistics at the end of each query.
138 This is useful for benchmarking or for use in tuning the number of
139 buffers.
140 .SH "DEPRECATED COMMAND OPTIONS"
141 There are several other options that may be specified, used mainly
142 for debugging purposes.  These are listed here only for the use by
143 Postgres system developers.
144 .BR "Use of any of these options is highly discouraged" .
145 Furthermore, any of these options may disappear or change at any time.
146 .TP
147 .BR "-A" "n|r|b|Q\fIn\fP|X\fIn\fP"
148 .IP
149 This option generates a tremendous amount of output.
150 .TP
151 .BR "-L"
152 Turns off the locking system.
153 .TP
154 .BR "-N"
155 Disables use of newline as a query delimiter.
156 .TP
157 .BR "-S"
158 Indicates that the transaction system can run with the assumption of
159 stable main memory, thereby avoiding the necessary flushing of data
160 and log pages to disk at the end of each transaction system.  This is
161 only used for performance comparisons for stable vs. non-stable
162 storage.  Do not use this in other cases, as recovery after a system
163 crash may be impossible when this option is specified in the absence
164 of stable main memory.
165 .TP
166 .BR "-b"
167 Enables generation of bushy query plan trees (as opposed to left-deep
168 query plans trees).  These query plans are not intended for actual
169 execution; in addition, this flag often causes Postgres to run out of
170 memory.
171 .TP
172 .BR "-f"
173 Forbids the use of particular scan and join methods:
174 .IR s " and " i
175 disable sequential and index scans respectively, while
176 .IR n ", " m " and " h
177 disable nested-loop, merge and hash joins respectively.
178 This is another feature that may not necessarily produce executable
179 plans.
180 .TP
181 .BR "-p"
182 Indicates to the backend server that it has been started by a 
183 .IR postmaster
184 and make different assumptions about buffer pool management, file
185 descriptors, etc.
186 .TP
187 .BR "-t" "pa[rser]|pl[anner]|e[xecutor]"
188 Print timing statistics for each query relating to each of the major
189 system modules.  This option cannot be used with
190 .BR "-s" .
191 .SH "SEE ALSO"
192 ipcclean(1),
193 psql(1), 
194 postmaster(1).
195 .SH "DIAGNOSTICS"
196 Of the nigh-infinite number of error messages you may see when you
197 execute the backend server directly, the most common will probably be:
198 .TP
199 .BR "semget: No space left on device"
200 If you see this message, you should run the
201 .IR ipcclean
202 command.  After doing this, try starting
203 .IR postgres
204 again.  If this still doesn't work, you probably need to configure
205 your kernel for shared memory and semaphores as described in the
206 installation notes.