~ubuntu-branches/debian/sid/postgresql-9.3/sid

« back to all changes in this revision

Viewing changes to src/include/pg_config_manual.h

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 05:39:52 UTC
  • Revision ID: package-import@ubuntu.com-20130508053952-1j7uilp7mjtrvq8q
Tags: upstream-9.3~beta1
ImportĀ upstreamĀ versionĀ 9.3~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
 
10
 * Portions Copyright (c) 1994, Regents of the University of California
 
11
 *
 
12
 * src/include/pg_config_manual.h
 
13
 *------------------------------------------------------------------------
 
14
 */
 
15
 
 
16
/*
 
17
 * Maximum length for identifiers (e.g. table names, column names,
 
18
 * function names).  Names actually are limited to one less byte than this,
 
19
 * because the length must include a trailing zero byte.
 
20
 *
 
21
 * Changing this requires an initdb.
 
22
 */
 
23
#define NAMEDATALEN 64
 
24
 
 
25
/*
 
26
 * Maximum number of arguments to a function.
 
27
 *
 
28
 * The minimum value is 8 (GIN indexes use 8-argument support functions).
 
29
 * The maximum possible value is around 600 (limited by index tuple size in
 
30
 * pg_proc's index; BLCKSZ larger than 8K would allow more).  Values larger
 
31
 * than needed will waste memory and processing time, but do not directly
 
32
 * cost disk space.
 
33
 *
 
34
 * Changing this does not require an initdb, but it does require a full
 
35
 * backend recompile (including any user-defined C functions).
 
36
 */
 
37
#define FUNC_MAX_ARGS           100
 
38
 
 
39
/*
 
40
 * Maximum number of columns in an index.  There is little point in making
 
41
 * this anything but a multiple of 32, because the main cost is associated
 
42
 * with index tuple header size (see access/itup.h).
 
43
 *
 
44
 * Changing this requires an initdb.
 
45
 */
 
46
#define INDEX_MAX_KEYS          32
 
47
 
 
48
/*
 
49
 * Set the upper and lower bounds of sequence values.
 
50
 */
 
51
#define SEQ_MAXVALUE    INT64CONST(0x7FFFFFFFFFFFFFFF)
 
52
#define SEQ_MINVALUE    (-SEQ_MAXVALUE)
 
53
 
 
54
/*
 
55
 * Number of spare LWLocks to allocate for user-defined add-on code.
 
56
 */
 
57
#define NUM_USER_DEFINED_LWLOCKS        4
 
58
 
 
59
/*
 
60
 * Define this if you want to allow the lo_import and lo_export SQL
 
61
 * functions to be executed by ordinary users.  By default these
 
62
 * functions are only available to the Postgres superuser.      CAUTION:
 
63
 * These functions are SECURITY HOLES since they can read and write
 
64
 * any file that the PostgreSQL server has permission to access.  If
 
65
 * you turn this on, don't say we didn't warn you.
 
66
 */
 
67
/* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
 
68
 
 
69
/*
 
70
 * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
 
71
 * maximum usable pathname length is one less).
 
72
 *
 
73
 * We'd use a standard system header symbol for this, if there weren't
 
74
 * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
 
75
 * defined by different "standards", and often have different values
 
76
 * on the same platform!  So we just punt and use a reasonably
 
77
 * generous setting here.
 
78
 */
 
79
#define MAXPGPATH               1024
 
80
 
 
81
/*
 
82
 * PG_SOMAXCONN: maximum accept-queue length limit passed to
 
83
 * listen(2).  You'd think we should use SOMAXCONN from
 
84
 * <sys/socket.h>, but on many systems that symbol is much smaller
 
85
 * than the kernel's actual limit.  In any case, this symbol need be
 
86
 * twiddled only if you have a kernel that refuses large limit values,
 
87
 * rather than silently reducing the value to what it can handle
 
88
 * (which is what most if not all Unixen do).
 
89
 */
 
90
#define PG_SOMAXCONN    10000
 
91
 
 
92
/*
 
93
 * You can try changing this if you have a machine with bytes of
 
94
 * another size, but no guarantee...
 
95
 */
 
96
#define BITS_PER_BYTE           8
 
97
 
 
98
/*
 
99
 * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
 
100
 * user space and kernel space are significantly faster if the user buffer
 
101
 * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
 
102
 * a platform-dependent value, but for now we just hard-wire it.
 
103
 */
 
104
#define ALIGNOF_BUFFER  32
 
105
 
 
106
/*
 
107
 * Disable UNIX sockets for certain operating systems.
 
108
 */
 
109
#if defined(WIN32)
 
110
#undef HAVE_UNIX_SOCKETS
 
111
#endif
 
112
 
 
113
/*
 
114
 * Define this if your operating system supports link()
 
115
 */
 
116
#if !defined(WIN32) && !defined(__CYGWIN__)
 
117
#define HAVE_WORKING_LINK 1
 
118
#endif
 
119
 
 
120
/*
 
121
 * USE_POSIX_FADVISE controls whether Postgres will attempt to use the
 
122
 * posix_fadvise() kernel call.  Usually the automatic configure tests are
 
123
 * sufficient, but some older Linux distributions had broken versions of
 
124
 * posix_fadvise().  If necessary you can remove the #define here.
 
125
 */
 
126
#if HAVE_DECL_POSIX_FADVISE && defined(HAVE_POSIX_FADVISE)
 
127
#define USE_POSIX_FADVISE
 
128
#endif
 
129
 
 
130
/*
 
131
 * USE_PREFETCH code should be compiled only if we have a way to implement
 
132
 * prefetching.  (This is decoupled from USE_POSIX_FADVISE because there
 
133
 * might in future be support for alternative low-level prefetch APIs.)
 
134
 */
 
135
#ifdef USE_POSIX_FADVISE
 
136
#define USE_PREFETCH
 
137
#endif
 
138
 
 
139
/*
 
140
 * This is the default directory in which AF_UNIX socket files are
 
141
 * placed.      Caution: changing this risks breaking your existing client
 
142
 * applications, which are likely to continue to look in the old
 
143
 * directory.  But if you just hate the idea of sockets in /tmp,
 
144
 * here's where to twiddle it.  You can also override this at runtime
 
145
 * with the postmaster's -k switch.
 
146
 */
 
147
#define DEFAULT_PGSOCKET_DIR  "/tmp"
 
148
 
 
149
/*
 
150
 * The random() function is expected to yield values between 0 and
 
151
 * MAX_RANDOM_VALUE.  Currently, all known implementations yield
 
152
 * 0..2^31-1, so we just hardwire this constant.  We could do a
 
153
 * configure test if it proves to be necessary.  CAUTION: Think not to
 
154
 * replace this with RAND_MAX.  RAND_MAX defines the maximum value of
 
155
 * the older rand() function, which is often different from --- and
 
156
 * considerably inferior to --- random().
 
157
 */
 
158
#define MAX_RANDOM_VALUE  (0x7FFFFFFF)
 
159
 
 
160
/*
 
161
 * Set the format style used by gcc to check printf type functions. We really
 
162
 * want the "gnu_printf" style set, which includes what glibc uses, such
 
163
 * as %m for error strings and %lld for 64 bit long longs. But not all gcc
 
164
 * compilers are known to support it, so we just use "printf" which all
 
165
 * gcc versions alive are known to support, except on Windows where
 
166
 * using "gnu_printf" style makes a dramatic difference. Maybe someday
 
167
 * we'll have a configure test for this, if we ever discover use of more
 
168
 * variants to be necessary.
 
169
 */
 
170
#ifdef WIN32
 
171
#define PG_PRINTF_ATTRIBUTE gnu_printf
 
172
#else
 
173
#define PG_PRINTF_ATTRIBUTE printf
 
174
#endif
 
175
 
 
176
/*
 
177
 * On PPC machines, decide whether to use the mutex hint bit in LWARX
 
178
 * instructions.  Setting the hint bit will slightly improve spinlock
 
179
 * performance on POWER6 and later machines, but does nothing before that,
 
180
 * and will result in illegal-instruction failures on some pre-POWER4
 
181
 * machines.  By default we use the hint bit when building for 64-bit PPC,
 
182
 * which should be safe in nearly all cases.  You might want to override
 
183
 * this if you are building 32-bit code for a known-recent PPC machine.
 
184
 */
 
185
#ifdef HAVE_PPC_LWARX_MUTEX_HINT        /* must have assembler support in any case */
 
186
#if defined(__ppc64__) || defined(__powerpc64__)
 
187
#define USE_PPC_LWARX_MUTEX_HINT
 
188
#endif
 
189
#endif
 
190
 
 
191
/*
 
192
 * On PPC machines, decide whether to use LWSYNC instructions in place of
 
193
 * ISYNC and SYNC.      This provides slightly better performance, but will
 
194
 * result in illegal-instruction failures on some pre-POWER4 machines.
 
195
 * By default we use LWSYNC when building for 64-bit PPC, which should be
 
196
 * safe in nearly all cases.
 
197
 */
 
198
#if defined(__ppc64__) || defined(__powerpc64__)
 
199
#define USE_PPC_LWSYNC
 
200
#endif
 
201
 
 
202
/*
 
203
 *------------------------------------------------------------------------
 
204
 * The following symbols are for enabling debugging code, not for
 
205
 * controlling user-visible features or resource limits.
 
206
 *------------------------------------------------------------------------
 
207
 */
 
208
 
 
209
/*
 
210
 * Define this to cause pfree()'d memory to be cleared immediately, to
 
211
 * facilitate catching bugs that refer to already-freed values.
 
212
 * Right now, this gets defined automatically if --enable-cassert.
 
213
 */
 
214
#ifdef USE_ASSERT_CHECKING
 
215
#define CLOBBER_FREED_MEMORY
 
216
#endif
 
217
 
 
218
/*
 
219
 * Define this to check memory allocation errors (scribbling on more
 
220
 * bytes than were allocated).  Right now, this gets defined
 
221
 * automatically if --enable-cassert.
 
222
 */
 
223
#ifdef USE_ASSERT_CHECKING
 
224
#define MEMORY_CONTEXT_CHECKING
 
225
#endif
 
226
 
 
227
/*
 
228
 * Define this to cause palloc()'d memory to be filled with random data, to
 
229
 * facilitate catching code that depends on the contents of uninitialized
 
230
 * memory.      Caution: this is horrendously expensive.
 
231
 */
 
232
/* #define RANDOMIZE_ALLOCATED_MEMORY */
 
233
 
 
234
/*
 
235
 * Define this to force all parse and plan trees to be passed through
 
236
 * copyObject(), to facilitate catching errors and omissions in
 
237
 * copyObject().
 
238
 */
 
239
/* #define COPY_PARSE_PLAN_TREES */
 
240
 
 
241
/*
 
242
 * Enable debugging print statements for lock-related operations.
 
243
 */
 
244
/* #define LOCK_DEBUG */
 
245
 
 
246
/*
 
247
 * Enable debugging print statements for WAL-related operations; see
 
248
 * also the wal_debug GUC var.
 
249
 */
 
250
/* #define WAL_DEBUG */
 
251
 
 
252
/*
 
253
 * Enable tracing of resource consumption during sort operations;
 
254
 * see also the trace_sort GUC var.  For 8.1 this is enabled by default.
 
255
 */
 
256
#define TRACE_SORT 1
 
257
 
 
258
/*
 
259
 * Enable tracing of syncscan operations (see also the trace_syncscan GUC var).
 
260
 */
 
261
/* #define TRACE_SYNCSCAN */
 
262
 
 
263
/*
 
264
 * Other debug #defines (documentation, anyone?)
 
265
 */
 
266
/* #define HEAPDEBUGALL */
 
267
/* #define ACLDEBUG */
 
268
/* #define RTDEBUG */