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.14 2004/08/29 05:06:55 momjian 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 * XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2
48 * and larger than BLCKSZ (preferably, a great deal larger than BLCKSZ).
50 * Changing XLOG_SEG_SIZE requires an initdb.
52 #define XLOG_SEG_SIZE (16*1024*1024)
55 * Maximum number of columns in an index and maximum number of
56 * arguments to a function. They must be the same value.
58 * The minimum value is 8 (index creation uses 8-argument functions).
59 * There is no specific upper limit, although large values will waste
60 * system-table space and processing time.
62 * Changing these requires an initdb.
64 #define INDEX_MAX_KEYS 32
65 #define FUNC_MAX_ARGS INDEX_MAX_KEYS
68 * Define this to make libpgtcl's "pg_result -assign" command process
69 * C-style backslash sequences in returned tuple data and convert
70 * PostgreSQL array values into Tcl lists. CAUTION: This conversion
71 * is *wrong* unless you install the routines in
72 * contrib/string/string_io to make the server produce C-style
73 * backslash sequences in the first place.
75 /* #define TCL_ARRAYS */
78 * User locks are handled totally on the application side as long term
79 * cooperative locks which extend beyond the normal transaction
80 * boundaries. Their purpose is to indicate to an application that
81 * someone is `working' on an item. Define this flag to enable user
82 * locks. You will need the loadable module user-locks.c to use this
88 * Define this if you want psql to _always_ ask for a username and a
89 * password for password authentication.
91 /* #define PSQL_ALWAYS_GET_PASSWORDS */
94 * Define this if you want to allow the lo_import and lo_export SQL
95 * functions to be executed by ordinary users. By default these
96 * functions are only available to the Postgres superuser. CAUTION:
97 * These functions are SECURITY HOLES since they can read and write
98 * any file that the PostgreSQL server has permission to access. If
99 * you turn this on, don't say we didn't warn you.
101 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
104 * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
105 * maximum usable pathname length is one less).
107 * We'd use a standard system header symbol for this, if there weren't
108 * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
109 * defined by different "standards", and often have different values
110 * on the same platform! So we just punt and use a reasonably
111 * generous setting here.
113 #define MAXPGPATH 1024
116 * PG_SOMAXCONN: maximum accept-queue length limit passed to
117 * listen(2). You'd think we should use SOMAXCONN from
118 * <sys/socket.h>, but on many systems that symbol is much smaller
119 * than the kernel's actual limit. In any case, this symbol need be
120 * twiddled only if you have a kernel that refuses large limit values,
121 * rather than silently reducing the value to what it can handle
122 * (which is what most if not all Unixen do).
124 #define PG_SOMAXCONN 10000
127 * You can try changing this if you have a machine with bytes of
128 * another size, but no guarantee...
130 #define BITS_PER_BYTE 8
133 * Preferred alignment for disk I/O buffers. On some CPUs, copies between
134 * user space and kernel space are significantly faster if the user buffer
135 * is aligned on a larger-than-MAXALIGN boundary. Ideally this should be
136 * a platform-dependent value, but for now we just hard-wire it.
138 #define ALIGNOF_BUFFER 32
141 * Disable UNIX sockets for those operating system.
143 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
144 #undef HAVE_UNIX_SOCKETS
148 * Define this if your operating system supports link()
150 #if !defined(__QNX__) && !defined(__BEOS__) && \
151 !defined(__CYGWIN__) && !defined(WIN32)
152 #define HAVE_WORKING_LINK 1
156 * This is the default directory in which AF_UNIX socket files are
157 * placed. Caution: changing this risks breaking your existing client
158 * applications, which are likely to continue to look in the old
159 * directory. But if you just hate the idea of sockets in /tmp,
160 * here's where to twiddle it. You can also override this at runtime
161 * with the postmaster's -k switch.
163 #define DEFAULT_PGSOCKET_DIR "/tmp"
166 * The random() function is expected to yield values between 0 and
167 * MAX_RANDOM_VALUE. Currently, all known implementations yield
168 * 0..2^31-1, so we just hardwire this constant. We could do a
169 * configure test if it proves to be necessary. CAUTION: Think not to
170 * replace this with RAND_MAX. RAND_MAX defines the maximum value of
171 * the older rand() function, which is often different from --- and
172 * considerably inferior to --- random().
174 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
178 *------------------------------------------------------------------------
179 * The following symbols are for enabling debugging code, not for
180 * controlling user-visible features or resource limits.
181 *------------------------------------------------------------------------
185 * Define this to cause pfree()'d memory to be cleared immediately, to
186 * facilitate catching bugs that refer to already-freed values. XXX
187 * Right now, this gets defined automatically if --enable-cassert. In
188 * the long term it probably doesn't need to be on by default.
190 #ifdef USE_ASSERT_CHECKING
191 #define CLOBBER_FREED_MEMORY
195 * Define this to check memory allocation errors (scribbling on more
196 * bytes than were allocated). Right now, this gets defined
197 * automatically if --enable-cassert. In the long term it probably
198 * doesn't need to be on by default.
200 #ifdef USE_ASSERT_CHECKING
201 #define MEMORY_CONTEXT_CHECKING
205 * Define this to force all parse and plan trees to be passed through
206 * copyObject(), to facilitate catching errors and omissions in
209 /* #define COPY_PARSE_PLAN_TREES */
212 * Enable debugging print statements for lock-related operations.
214 /* #define LOCK_DEBUG */
217 * Enable debugging print statements for WAL-related operations; see
218 * also the wal_debug GUC var.
220 /* #define WAL_DEBUG */
223 * Other debug #defines (documentation, anyone?)
225 /* #define IPORTAL_DEBUG */
226 /* #define HEAPDEBUGALL */
227 /* #define ACLDEBUG */
228 /* #define RTDEBUG */
229 /* #define GISTDEBUG */