]> granicus.if.org Git - postgresql/blob - src/include/pg_config_manual.h
Remove long-unused and broken TCL_ARRAYS.
[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.28 2008/02/29 20:58:33 alvherre 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  * Size of a WAL file block.  This need have no particular relation to BLCKSZ.
48  * XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
49  * XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
50  * buffers, else direct I/O may fail.
51  *
52  * Changing XLOG_BLCKSZ requires an initdb.
53  */
54 #define XLOG_BLCKSZ             8192
55
56 /*
57  * XLOG_SEG_SIZE is the size of a single WAL file.      This must be a power of 2
58  * and larger than XLOG_BLCKSZ (preferably, a great deal larger than
59  * XLOG_BLCKSZ).
60  *
61  * Changing XLOG_SEG_SIZE requires an initdb.
62  */
63 #define XLOG_SEG_SIZE   (16*1024*1024)
64
65 /*
66  * Maximum length for identifiers (e.g. table names, column names,
67  * function names).  It must be a multiple of sizeof(int) (typically
68  * 4).
69  *
70  * Changing this requires an initdb.
71  */
72 #define NAMEDATALEN 64
73
74 /*
75  * Maximum number of arguments to a function.
76  *
77  * The minimum value is 8 (index cost estimation uses 8-argument functions).
78  * The maximum possible value is around 600 (limited by index tuple size in
79  * pg_proc's index; BLCKSZ larger than 8K would allow more).  Values larger
80  * than needed will waste memory and processing time, but do not directly
81  * cost disk space.
82  *
83  * Changing this does not require an initdb, but it does require a full
84  * backend recompile (including any user-defined C functions).
85  */
86 #define FUNC_MAX_ARGS           100
87
88 /*
89  * Maximum number of columns in an index.  There is little point in making
90  * this anything but a multiple of 32, because the main cost is associated
91  * with index tuple header size (see access/itup.h).
92  *
93  * Changing this requires an initdb.
94  */
95 #define INDEX_MAX_KEYS          32
96
97 /*
98  * Number of spare LWLocks to allocate for user-defined add-on code.
99  */
100 #define NUM_USER_DEFINED_LWLOCKS        4
101
102 /*
103  * Define this if you want psql to _always_ ask for a username and a
104  * password for password authentication.
105  */
106 /* #define PSQL_ALWAYS_GET_PASSWORDS */
107
108 /*
109  * Define this if you want to allow the lo_import and lo_export SQL
110  * functions to be executed by ordinary users.  By default these
111  * functions are only available to the Postgres superuser.      CAUTION:
112  * These functions are SECURITY HOLES since they can read and write
113  * any file that the PostgreSQL server has permission to access.  If
114  * you turn this on, don't say we didn't warn you.
115  */
116 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
117
118 /*
119  * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
120  * maximum usable pathname length is one less).
121  *
122  * We'd use a standard system header symbol for this, if there weren't
123  * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
124  * defined by different "standards", and often have different values
125  * on the same platform!  So we just punt and use a reasonably
126  * generous setting here.
127  */
128 #define MAXPGPATH               1024
129
130 /*
131  * PG_SOMAXCONN: maximum accept-queue length limit passed to
132  * listen(2).  You'd think we should use SOMAXCONN from
133  * <sys/socket.h>, but on many systems that symbol is much smaller
134  * than the kernel's actual limit.  In any case, this symbol need be
135  * twiddled only if you have a kernel that refuses large limit values,
136  * rather than silently reducing the value to what it can handle
137  * (which is what most if not all Unixen do).
138  */
139 #define PG_SOMAXCONN    10000
140
141 /*
142  * You can try changing this if you have a machine with bytes of
143  * another size, but no guarantee...
144  */
145 #define BITS_PER_BYTE           8
146
147 /*
148  * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
149  * user space and kernel space are significantly faster if the user buffer
150  * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
151  * a platform-dependent value, but for now we just hard-wire it.
152  */
153 #define ALIGNOF_BUFFER  32
154
155 /*
156  * Disable UNIX sockets for those operating system.
157  */
158 #if defined(WIN32)
159 #undef HAVE_UNIX_SOCKETS
160 #endif
161
162 /*
163  * Define this if your operating system supports link()
164  */
165 #if !defined(WIN32) && !defined(__CYGWIN__)
166 #define HAVE_WORKING_LINK 1
167 #endif
168
169 /*
170  * This is the default directory in which AF_UNIX socket files are
171  * placed.      Caution: changing this risks breaking your existing client
172  * applications, which are likely to continue to look in the old
173  * directory.  But if you just hate the idea of sockets in /tmp,
174  * here's where to twiddle it.  You can also override this at runtime
175  * with the postmaster's -k switch.
176  */
177 #define DEFAULT_PGSOCKET_DIR  "/tmp"
178
179 /*
180  * The random() function is expected to yield values between 0 and
181  * MAX_RANDOM_VALUE.  Currently, all known implementations yield
182  * 0..2^31-1, so we just hardwire this constant.  We could do a
183  * configure test if it proves to be necessary.  CAUTION: Think not to
184  * replace this with RAND_MAX.  RAND_MAX defines the maximum value of
185  * the older rand() function, which is often different from --- and
186  * considerably inferior to --- random().
187  */
188 #define MAX_RANDOM_VALUE  (0x7FFFFFFF)
189
190
191 /*
192  *------------------------------------------------------------------------
193  * The following symbols are for enabling debugging code, not for
194  * controlling user-visible features or resource limits.
195  *------------------------------------------------------------------------
196  */
197
198 /*
199  * Define this to cause pfree()'d memory to be cleared immediately, to
200  * facilitate catching bugs that refer to already-freed values.  XXX
201  * Right now, this gets defined automatically if --enable-cassert.      In
202  * the long term it probably doesn't need to be on by default.
203  */
204 #ifdef USE_ASSERT_CHECKING
205 #define CLOBBER_FREED_MEMORY
206 #endif
207
208 /*
209  * Define this to check memory allocation errors (scribbling on more
210  * bytes than were allocated).  Right now, this gets defined
211  * automatically if --enable-cassert.  In the long term it probably
212  * doesn't need to be on by default.
213  */
214 #ifdef USE_ASSERT_CHECKING
215 #define MEMORY_CONTEXT_CHECKING
216 #endif
217
218 /*
219  * Define this to force all parse and plan trees to be passed through
220  * copyObject(), to facilitate catching errors and omissions in
221  * copyObject().
222  */
223 /* #define COPY_PARSE_PLAN_TREES */
224
225 /*
226  * Enable debugging print statements for lock-related operations.
227  */
228 /* #define LOCK_DEBUG */
229
230 /*
231  * Enable debugging print statements for WAL-related operations; see
232  * also the wal_debug GUC var.
233  */
234 /* #define WAL_DEBUG */
235
236 /*
237  * Enable tracing of resource consumption during sort operations;
238  * see also the trace_sort GUC var.  For 8.1 this is enabled by default.
239  */
240 #define TRACE_SORT 1
241
242 /*
243  * Enable tracing of syncscan operations (see also the trace_syncscan GUC var).
244  */
245 /* #define TRACE_SYNCSCAN */
246
247 /*
248  * Other debug #defines (documentation, anyone?)
249  */
250 /* #define HEAPDEBUGALL */
251 /* #define ACLDEBUG */
252 /* #define RTDEBUG */