]> granicus.if.org Git - postgresql/blob - src/include/pg_config_manual.h
Allow Win32 to compile under MinGW. Major changes are:
[postgresql] / src / 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.3 2003/05/15 16:35:29 momjian 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  * Define this if your operating system supports AF_UNIX family
131  * sockets.
132  */
133 #if !defined(__QNX__) && !defined(__BEOS__) && !defined(WIN32)
134 # define HAVE_UNIX_SOCKETS 1
135 #endif
136
137 /*
138  * Define this if your operating system supports link()
139  */
140 #if !defined(__QNX__) && !defined(__BEOS__) && \
141         !defined(__CYGWIN__) && !defined(WIN32)
142 # define HAVE_WORKING_LINK 1
143 #endif
144   
145 /*
146  * Define this if your operating system has _timezone rather than timezone
147  */
148 #if defined(__CYGWIN__) || defined(WIN32)
149 # define HAVE_INT_TIMEZONE              /* has int _timezone */
150 # define HAVE_UNDERSCORE_TIMEZONE 1
151 #endif
152   
153 /*
154  * This is the default directory in which AF_UNIX socket files are
155  * placed.  Caution: changing this risks breaking your existing client
156  * applications, which are likely to continue to look in the old
157  * directory.  But if you just hate the idea of sockets in /tmp,
158  * here's where to twiddle it.  You can also override this at runtime
159  * with the postmaster's -k switch.
160  */
161 #define DEFAULT_PGSOCKET_DIR  "/tmp"
162
163 /*
164  * Defining this will make float4 and float8 operations faster by
165  * suppressing overflow/underflow checks.
166  */
167 /* #define UNSAFE_FLOATS */
168
169 /*
170  * The random() function is expected to yield values between 0 and
171  * MAX_RANDOM_VALUE.  Currently, all known implementations yield
172  * 0..2^31-1, so we just hardwire this constant.  We could do a
173  * configure test if it proves to be necessary.  CAUTION: Think not to
174  * replace this with RAND_MAX.  RAND_MAX defines the maximum value of
175  * the older rand() function, which is often different from --- and
176  * considerably inferior to --- random().
177  */
178 #define MAX_RANDOM_VALUE  (0x7FFFFFFF)
179
180
181 /*
182  *------------------------------------------------------------------------
183  * The following symbols are for enabling debugging code, not for
184  * controlling user-visible features or resource limits.
185  *------------------------------------------------------------------------
186  */
187
188 /*
189  * Define this to cause pfree()'d memory to be cleared immediately, to
190  * facilitate catching bugs that refer to already-freed values.  XXX
191  * Right now, this gets defined automatically if --enable-cassert.  In
192  * the long term it probably doesn't need to be on by default.
193  */
194 #ifdef USE_ASSERT_CHECKING
195 #define CLOBBER_FREED_MEMORY
196 #endif
197
198 /*
199  * Define this to check memory allocation errors (scribbling on more
200  * bytes than were allocated).  Right now, this gets defined
201  * automatically if --enable-cassert.  In the long term it probably
202  * doesn't need to be on by default.
203  */
204 #ifdef USE_ASSERT_CHECKING 
205 #define MEMORY_CONTEXT_CHECKING
206 #endif
207
208 /*
209  * Define this to force all parse and plan trees to be passed through
210  * copyObject(), to facilitate catching errors and omissions in
211  * copyObject().
212  */
213 /* #define COPY_PARSE_PLAN_TREES */
214
215 /*
216  * Enable debugging print statements for lock-related operations.
217  */
218 /* #define LOCK_DEBUG */
219
220 /*
221  * Other debug #defines (documentation, anyone?)
222  */
223 /* #define IPORTAL_DEBUG  */
224 /* #define HEAPDEBUGALL  */
225 /* #define ISTRATDEBUG  */
226 /* #define ACLDEBUG */
227 /* #define RTDEBUG */
228 /* #define GISTDEBUG */