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.17 2005/10/03 22:55:56 tgl 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 arguments to a function.
57 * The minimum value is 8 (index creation uses 8-argument functions).
58 * The maximum possible value is around 600 (limited by index tuple size in
59 * pg_proc's index; BLCKSZ larger than 8K would allow more). Values larger
60 * than needed will waste memory and processing time, but do not directly
63 * Changing this does not require an initdb, but it does require a full
64 * backend recompile (including any user-defined C functions).
66 #define FUNC_MAX_ARGS 100
69 * Maximum number of columns in an index. There is little point in making
70 * this anything but a multiple of 32, because the main cost is associated
71 * with index tuple header size (see access/itup.h).
73 * Changing this requires an initdb.
75 #define INDEX_MAX_KEYS 32
78 * Define this to make libpgtcl's "pg_result -assign" command process
79 * C-style backslash sequences in returned tuple data and convert
80 * PostgreSQL array values into Tcl lists. CAUTION: This conversion
81 * is *wrong* unless you install the routines in
82 * contrib/string/string_io to make the server produce C-style
83 * backslash sequences in the first place.
85 /* #define TCL_ARRAYS */
88 * User locks are handled totally on the application side as long term
89 * cooperative locks which extend beyond the normal transaction
90 * boundaries. Their purpose is to indicate to an application that
91 * someone is `working' on an item. Define this flag to enable user
92 * locks. You will need the loadable module user-locks.c to use this
98 * Define this if you want psql to _always_ ask for a username and a
99 * password for password authentication.
101 /* #define PSQL_ALWAYS_GET_PASSWORDS */
104 * Define this if you want to allow the lo_import and lo_export SQL
105 * functions to be executed by ordinary users. By default these
106 * functions are only available to the Postgres superuser. CAUTION:
107 * These functions are SECURITY HOLES since they can read and write
108 * any file that the PostgreSQL server has permission to access. If
109 * you turn this on, don't say we didn't warn you.
111 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
114 * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
115 * maximum usable pathname length is one less).
117 * We'd use a standard system header symbol for this, if there weren't
118 * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
119 * defined by different "standards", and often have different values
120 * on the same platform! So we just punt and use a reasonably
121 * generous setting here.
123 #define MAXPGPATH 1024
126 * PG_SOMAXCONN: maximum accept-queue length limit passed to
127 * listen(2). You'd think we should use SOMAXCONN from
128 * <sys/socket.h>, but on many systems that symbol is much smaller
129 * than the kernel's actual limit. In any case, this symbol need be
130 * twiddled only if you have a kernel that refuses large limit values,
131 * rather than silently reducing the value to what it can handle
132 * (which is what most if not all Unixen do).
134 #define PG_SOMAXCONN 10000
137 * You can try changing this if you have a machine with bytes of
138 * another size, but no guarantee...
140 #define BITS_PER_BYTE 8
143 * Preferred alignment for disk I/O buffers. On some CPUs, copies between
144 * user space and kernel space are significantly faster if the user buffer
145 * is aligned on a larger-than-MAXALIGN boundary. Ideally this should be
146 * a platform-dependent value, but for now we just hard-wire it.
148 #define ALIGNOF_BUFFER 32
151 * Disable UNIX sockets for those operating system.
153 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
154 #undef HAVE_UNIX_SOCKETS
158 * Define this if your operating system supports link()
160 #if !defined(__QNX__) && !defined(__BEOS__) && \
161 !defined(WIN32) && !defined(__CYGWIN__)
162 #define HAVE_WORKING_LINK 1
166 * This is the default directory in which AF_UNIX socket files are
167 * placed. Caution: changing this risks breaking your existing client
168 * applications, which are likely to continue to look in the old
169 * directory. But if you just hate the idea of sockets in /tmp,
170 * here's where to twiddle it. You can also override this at runtime
171 * with the postmaster's -k switch.
173 #define DEFAULT_PGSOCKET_DIR "/tmp"
176 * The random() function is expected to yield values between 0 and
177 * MAX_RANDOM_VALUE. Currently, all known implementations yield
178 * 0..2^31-1, so we just hardwire this constant. We could do a
179 * configure test if it proves to be necessary. CAUTION: Think not to
180 * replace this with RAND_MAX. RAND_MAX defines the maximum value of
181 * the older rand() function, which is often different from --- and
182 * considerably inferior to --- random().
184 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
188 *------------------------------------------------------------------------
189 * The following symbols are for enabling debugging code, not for
190 * controlling user-visible features or resource limits.
191 *------------------------------------------------------------------------
195 * Define this to cause pfree()'d memory to be cleared immediately, to
196 * facilitate catching bugs that refer to already-freed values. XXX
197 * Right now, this gets defined automatically if --enable-cassert. In
198 * the long term it probably doesn't need to be on by default.
200 #ifdef USE_ASSERT_CHECKING
201 #define CLOBBER_FREED_MEMORY
205 * Define this to check memory allocation errors (scribbling on more
206 * bytes than were allocated). Right now, this gets defined
207 * automatically if --enable-cassert. In the long term it probably
208 * doesn't need to be on by default.
210 #ifdef USE_ASSERT_CHECKING
211 #define MEMORY_CONTEXT_CHECKING
215 * Define this to force all parse and plan trees to be passed through
216 * copyObject(), to facilitate catching errors and omissions in
219 /* #define COPY_PARSE_PLAN_TREES */
222 * Enable debugging print statements for lock-related operations.
224 /* #define LOCK_DEBUG */
227 * Enable debugging print statements for WAL-related operations; see
228 * also the wal_debug GUC var.
230 /* #define WAL_DEBUG */
233 * Enable tracing of resource consumption during sort operations;
234 * see also the trace_sort GUC var. For 8.1 this is enabled by default.
239 * Other debug #defines (documentation, anyone?)
241 /* #define HEAPDEBUGALL */
242 /* #define ACLDEBUG */
243 /* #define RTDEBUG */