OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / pg_config_manual.h
1 /*------------------------------------------------------------------------
2  * PostgreSQL manual configuration settings
3  *
4  * This file contains various configuration symbols and limits.  In
5  * all cases, changing them is only useful in very rare situations or
6  * for developers.      If you edit any of these, be sure to do a *full*
7  * rebuild (and an initdb if noted).
8  *
9  * $Id: pg_config_manual.h,v 1.6 2003/09/21 17:57:21 tgl Exp $
10  *------------------------------------------------------------------------
11  */
12
13 /*
14  * Size of a disk block --- this also limits the size of a tuple.  You
15  * can set it bigger if you need bigger tuples (although TOAST should
16  * reduce the need to have large tuples, since fields can be spread
17  * across multiple tuples).
18  *
19  * BLCKSZ must be a power of 2.  The maximum possible value of BLCKSZ
20  * is currently 2^15 (32768).  This is determined by the 15-bit widths
21  * of the lp_off and lp_len fields in ItemIdData (see
22  * include/storage/itemid.h).
23  *
24  * Changing BLCKSZ requires an initdb.
25  */
26 #define BLCKSZ  8192
27
28 /*
29  * RELSEG_SIZE is the maximum number of blocks allowed in one disk
30  * file.  Thus, the maximum size of a single file is RELSEG_SIZE *
31  * BLCKSZ; relations bigger than that are divided into multiple files.
32  *
33  * RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
34  * This is often 2 GB or 4GB in a 32-bit operating system, unless you
35  * have large file support enabled.  By default, we make the limit 1
36  * GB to avoid any possible integer-overflow problems within the OS.
37  * A limit smaller than necessary only means we divide a large
38  * relation into more chunks than necessary, so it seems best to err
39  * in the direction of a small limit.  (Besides, a power-of-2 value
40  * saves a few cycles in md.c.)
41  *
42  * Changing RELSEG_SIZE requires an initdb.
43  */
44 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
45
46 /*
47  * Maximum number of columns in an index and maximum number of
48  * arguments to a function. They must be the same value.
49  *
50  * The minimum value is 8 (index creation uses 8-argument functions).
51  * There is no specific upper limit, although large values will waste
52  * system-table space and processing time.
53  *
54  * Changing these requires an initdb.
55  */
56 #define INDEX_MAX_KEYS          32
57 #define FUNC_MAX_ARGS           INDEX_MAX_KEYS
58
59 /*
60  * Define this to make libpgtcl's "pg_result -assign" command process
61  * C-style backslash sequences in returned tuple data and convert
62  * PostgreSQL array values into Tcl lists.      CAUTION: This conversion
63  * is *wrong* unless you install the routines in
64  * contrib/string/string_io to make the server produce C-style
65  * backslash sequences in the first place.
66  */
67 /* #define TCL_ARRAYS */
68
69 /*
70  * User locks are handled totally on the application side as long term
71  * cooperative locks which extend beyond the normal transaction
72  * boundaries.  Their purpose is to indicate to an application that
73  * someone is `working' on an item.  Define this flag to enable user
74  * locks.  You will need the loadable module user-locks.c to use this
75  * feature.
76  */
77 #define USER_LOCKS
78
79 /*
80  * Define this if you want psql to _always_ ask for a username and a
81  * password for password authentication.
82  */
83 /* #define PSQL_ALWAYS_GET_PASSWORDS */
84
85 /*
86  * Define this if you want to allow the lo_import and lo_export SQL
87  * functions to be executed by ordinary users.  By default these
88  * functions are only available to the Postgres superuser.      CAUTION:
89  * These functions are SECURITY HOLES since they can read and write
90  * any file that the PostgreSQL server has permission to access.  If
91  * you turn this on, don't say we didn't warn you.
92  */
93 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
94
95 /*
96  * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
97  * maximum usable pathname length is one less).
98  *
99  * We'd use a standard system header symbol for this, if there weren't
100  * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
101  * defined by different "standards", and often have different values
102  * on the same platform!  So we just punt and use a reasonably
103  * generous setting here.
104  */
105 #define MAXPGPATH               1024
106
107 /*
108  * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
109  */
110 #define DEFAULT_MAX_EXPR_DEPTH  10000
111
112 /*
113  * PG_SOMAXCONN: maximum accept-queue length limit passed to
114  * listen(2).  You'd think we should use SOMAXCONN from
115  * <sys/socket.h>, but on many systems that symbol is much smaller
116  * than the kernel's actual limit.  In any case, this symbol need be
117  * twiddled only if you have a kernel that refuses large limit values,
118  * rather than silently reducing the value to what it can handle
119  * (which is what most if not all Unixen do).
120  */
121 #define PG_SOMAXCONN    10000
122
123 /*
124  * You can try changing this if you have a machine with bytes of
125  * another size, but no guarantee...
126  */
127 #define BITS_PER_BYTE           8
128
129 /*
130  * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
131  * user space and kernel space are significantly faster if the user buffer
132  * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
133  * a platform-dependent value, but for now we just hard-wire it.
134  */
135 #define ALIGNOF_BUFFER  32
136
137 /*
138  * Disable UNIX sockets for those operating system.
139  */
140 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
141 #undef HAVE_UNIX_SOCKETS
142 #endif
143
144 /*
145  * Define this if your operating system supports link()
146  */
147 #if !defined(__QNX__) && !defined(__BEOS__) && \
148         !defined(__CYGWIN__) && !defined(WIN32)
149 #define HAVE_WORKING_LINK 1
150 #endif
151
152 /*
153  * Define this if your operating system has _timezone rather than timezone
154  */
155 #if defined(__CYGWIN__) || defined(WIN32)
156 #define HAVE_INT_TIMEZONE               /* has int _timezone */
157 #define HAVE_UNDERSCORE_TIMEZONE 1
158 #endif
159
160 /*
161  * This is the default directory in which AF_UNIX socket files are
162  * placed.      Caution: changing this risks breaking your existing client
163  * applications, which are likely to continue to look in the old
164  * directory.  But if you just hate the idea of sockets in /tmp,
165  * here's where to twiddle it.  You can also override this at runtime
166  * with the postmaster's -k switch.
167  */
168 #define DEFAULT_PGSOCKET_DIR  "/tmp"
169
170 /*
171  * Defining this will make float4 and float8 operations faster by
172  * suppressing overflow/underflow checks.
173  */
174 /* #define UNSAFE_FLOATS */
175
176 /*
177  * The random() function is expected to yield values between 0 and
178  * MAX_RANDOM_VALUE.  Currently, all known implementations yield
179  * 0..2^31-1, so we just hardwire this constant.  We could do a
180  * configure test if it proves to be necessary.  CAUTION: Think not to
181  * replace this with RAND_MAX.  RAND_MAX defines the maximum value of
182  * the older rand() function, which is often different from --- and
183  * considerably inferior to --- random().
184  */
185 #define MAX_RANDOM_VALUE  (0x7FFFFFFF)
186
187
188 /*
189  *------------------------------------------------------------------------
190  * The following symbols are for enabling debugging code, not for
191  * controlling user-visible features or resource limits.
192  *------------------------------------------------------------------------
193  */
194
195 /*
196  * Define this to cause pfree()'d memory to be cleared immediately, to
197  * facilitate catching bugs that refer to already-freed values.  XXX
198  * Right now, this gets defined automatically if --enable-cassert.      In
199  * the long term it probably doesn't need to be on by default.
200  */
201 #ifdef USE_ASSERT_CHECKING
202 #define CLOBBER_FREED_MEMORY
203 #endif
204
205 /*
206  * Define this to check memory allocation errors (scribbling on more
207  * bytes than were allocated).  Right now, this gets defined
208  * automatically if --enable-cassert.  In the long term it probably
209  * doesn't need to be on by default.
210  */
211 #ifdef USE_ASSERT_CHECKING
212 #define MEMORY_CONTEXT_CHECKING
213 #endif
214
215 /*
216  * Define this to force all parse and plan trees to be passed through
217  * copyObject(), to facilitate catching errors and omissions in
218  * copyObject().
219  */
220 /* #define COPY_PARSE_PLAN_TREES */
221
222 /*
223  * Enable debugging print statements for lock-related operations.
224  */
225 /* #define LOCK_DEBUG */
226
227 /*
228  * Other debug #defines (documentation, anyone?)
229  */
230 /* #define IPORTAL_DEBUG  */
231 /* #define HEAPDEBUGALL  */
232 /* #define ISTRATDEBUG  */
233 /* #define ACLDEBUG */
234 /* #define RTDEBUG */
235 /* #define GISTDEBUG */