1 /*------------------------------------------------------------------------
2 * PostgreSQL manual configuration settings
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).
9 * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.8 2003/11/29 22:40:53 pgsql Exp $
10 *------------------------------------------------------------------------
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).
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).
24 * Changing BLCKSZ requires an initdb.
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.
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.)
42 * Changing RELSEG_SIZE requires an initdb.
44 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
47 * Maximum number of columns in an index and maximum number of
48 * arguments to a function. They must be the same value.
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.
54 * Changing these requires an initdb.
56 #define INDEX_MAX_KEYS 32
57 #define FUNC_MAX_ARGS INDEX_MAX_KEYS
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.
67 /* #define TCL_ARRAYS */
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
80 * Define this if you want psql to _always_ ask for a username and a
81 * password for password authentication.
83 /* #define PSQL_ALWAYS_GET_PASSWORDS */
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.
93 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
96 * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
97 * maximum usable pathname length is one less).
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.
105 #define MAXPGPATH 1024
108 * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
110 #define DEFAULT_MAX_EXPR_DEPTH 10000
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).
121 #define PG_SOMAXCONN 10000
124 * You can try changing this if you have a machine with bytes of
125 * another size, but no guarantee...
127 #define BITS_PER_BYTE 8
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.
135 #define ALIGNOF_BUFFER 32
138 * Disable UNIX sockets for those operating system.
140 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
141 #undef HAVE_UNIX_SOCKETS
145 * Define this if your operating system supports link()
147 #if !defined(__QNX__) && !defined(__BEOS__) && \
148 !defined(__CYGWIN__) && !defined(WIN32)
149 #define HAVE_WORKING_LINK 1
153 * Define this if your operating system has _timezone rather than timezone
155 #if defined(__CYGWIN__) || defined(WIN32)
156 #define HAVE_INT_TIMEZONE /* has int _timezone */
157 #define HAVE_UNDERSCORE_TIMEZONE 1
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.
168 #define DEFAULT_PGSOCKET_DIR "/tmp"
171 * Defining this will make float4 and float8 operations faster by
172 * suppressing overflow/underflow checks.
174 /* #define UNSAFE_FLOATS */
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().
185 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
189 *------------------------------------------------------------------------
190 * The following symbols are for enabling debugging code, not for
191 * controlling user-visible features or resource limits.
192 *------------------------------------------------------------------------
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.
201 #ifdef USE_ASSERT_CHECKING
202 #define CLOBBER_FREED_MEMORY
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.
211 #ifdef USE_ASSERT_CHECKING
212 #define MEMORY_CONTEXT_CHECKING
216 * Define this to force all parse and plan trees to be passed through
217 * copyObject(), to facilitate catching errors and omissions in
220 /* #define COPY_PARSE_PLAN_TREES */
223 * Enable debugging print statements for lock-related operations.
225 /* #define LOCK_DEBUG */
228 * Other debug #defines (documentation, anyone?)
230 /* #define IPORTAL_DEBUG */
231 /* #define HEAPDEBUGALL */
232 /* #define ACLDEBUG */
233 /* #define RTDEBUG */
234 /* #define GISTDEBUG */