]> granicus.if.org Git - postgresql/blob - src/include/pg_config_manual.h
Pgindent run for 8.0.
[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  * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.14 2004/08/29 05:06:55 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  * 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).
49  *
50  * Changing XLOG_SEG_SIZE requires an initdb.
51  */
52 #define XLOG_SEG_SIZE   (16*1024*1024)
53
54 /*
55  * Maximum number of columns in an index and maximum number of
56  * arguments to a function. They must be the same value.
57  *
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.
61  *
62  * Changing these requires an initdb.
63  */
64 #define INDEX_MAX_KEYS          32
65 #define FUNC_MAX_ARGS           INDEX_MAX_KEYS
66
67 /*
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.
74  */
75 /* #define TCL_ARRAYS */
76
77 /*
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
83  * feature.
84  */
85 #define USER_LOCKS
86
87 /*
88  * Define this if you want psql to _always_ ask for a username and a
89  * password for password authentication.
90  */
91 /* #define PSQL_ALWAYS_GET_PASSWORDS */
92
93 /*
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.
100  */
101 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
102
103 /*
104  * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
105  * maximum usable pathname length is one less).
106  *
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.
112  */
113 #define MAXPGPATH               1024
114
115 /*
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).
123  */
124 #define PG_SOMAXCONN    10000
125
126 /*
127  * You can try changing this if you have a machine with bytes of
128  * another size, but no guarantee...
129  */
130 #define BITS_PER_BYTE           8
131
132 /*
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.
137  */
138 #define ALIGNOF_BUFFER  32
139
140 /*
141  * Disable UNIX sockets for those operating system.
142  */
143 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
144 #undef HAVE_UNIX_SOCKETS
145 #endif
146
147 /*
148  * Define this if your operating system supports link()
149  */
150 #if !defined(__QNX__) && !defined(__BEOS__) && \
151         !defined(__CYGWIN__) && !defined(WIN32)
152 #define HAVE_WORKING_LINK 1
153 #endif
154
155 /*
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.
162  */
163 #define DEFAULT_PGSOCKET_DIR  "/tmp"
164
165 /*
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().
173  */
174 #define MAX_RANDOM_VALUE  (0x7FFFFFFF)
175
176
177 /*
178  *------------------------------------------------------------------------
179  * The following symbols are for enabling debugging code, not for
180  * controlling user-visible features or resource limits.
181  *------------------------------------------------------------------------
182  */
183
184 /*
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.
189  */
190 #ifdef USE_ASSERT_CHECKING
191 #define CLOBBER_FREED_MEMORY
192 #endif
193
194 /*
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.
199  */
200 #ifdef USE_ASSERT_CHECKING
201 #define MEMORY_CONTEXT_CHECKING
202 #endif
203
204 /*
205  * Define this to force all parse and plan trees to be passed through
206  * copyObject(), to facilitate catching errors and omissions in
207  * copyObject().
208  */
209 /* #define COPY_PARSE_PLAN_TREES */
210
211 /*
212  * Enable debugging print statements for lock-related operations.
213  */
214 /* #define LOCK_DEBUG */
215
216 /*
217  * Enable debugging print statements for WAL-related operations; see
218  * also the wal_debug GUC var.
219  */
220 /* #define WAL_DEBUG */
221
222 /*
223  * Other debug #defines (documentation, anyone?)
224  */
225 /* #define IPORTAL_DEBUG  */
226 /* #define HEAPDEBUGALL  */
227 /* #define ACLDEBUG */
228 /* #define RTDEBUG */
229 /* #define GISTDEBUG */