2 * PostgreSQL configuration-settings file.
4 * config.h.in is processed by configure to produce config.h.
6 * If you want to modify any of the tweakable settings in Part 2
7 * of this file, you can do it in config.h.in before running configure,
8 * or in config.h afterwards. Of course, if you edit config.h, then your
9 * changes will be overwritten the next time you run configure.
11 * $Id: config.h.in,v 1.156 2001/01/19 23:43:35 petere Exp $
19 *------------------------------------------------------------------------
20 * Part 1: feature symbols and limits that are set by configure based on
21 * user-supplied switches. This is first so that stuff in Part 2 can
22 * depend on these values.
24 * Beware of "fixing" configure-time mistakes by editing these values,
25 * since configure may have inserted the settings in other files as well
26 * as here. Best to rerun configure if you forgot --enable-multibyte
28 *------------------------------------------------------------------------
31 /* The version number is actually hard-coded into configure.in */
33 /* A canonical string containing the version number, platform, and C compiler */
36 /* Set to 1 if you want LOCALE support (--enable-locale) */
39 /* Set to 1 if you want cyrillic recode (--enable-recode) */
42 /* Set to 1 if you want to use multibyte characters (--enable-multibyte) */
45 /* Set to 1 if you want Unicode conversion support (--enable-uniconv) */
46 #undef UNICODE_CONVERSION
48 /* Set to 1 if you want ASSERT checking (--enable-cassert) */
49 #undef USE_ASSERT_CHECKING
51 /* Set to 1 to use syslog() to write postmaster log (--enable-syslog) */
54 /* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
57 /* Define to build with Kerberos 5 support (--with-krb5[=DIR]) */
60 /* Kerberos name of the Postgres service principal (--with-krb-srvnam=NAME) */
63 /* Define to build with (Open)SSL support (--with-openssl[=DIR]) */
67 * DEF_PGPORT is the TCP port number on which the Postmaster listens and
68 * which clients will try to connect to. This is just a default value;
69 * it can be overridden at postmaster or client startup. It's awfully
70 * convenient if your clients have the right default compiled in, though.
71 * (--with-pgport=PORTNUM)
74 /* ... and once more as a string constant instead */
78 * Default soft limit on number of backend server processes per postmaster;
79 * this is just the default setting for the postmaster's -N switch.
80 * (--with-maxbackends=N)
82 #undef DEF_MAXBACKENDS
86 *------------------------------------------------------------------------
87 * Part 2: feature symbols and limits that are user-configurable, but
88 * only by editing this file ... there's no configure support for them.
90 * Editing this file and doing a full rebuild (and an initdb if noted)
91 * should be sufficient to change any of these.
92 *------------------------------------------------------------------------
96 * Hard limit on number of backend server processes per postmaster.
97 * Increasing this costs about 32 bytes per process slot as of v 6.5.
99 #define MAXBACKENDS (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
102 * Default number of buffers in shared buffer pool (each of size BLCKSZ).
103 * This is just the default setting for the postmaster's -B switch.
104 * Perhaps it ought to be configurable from a configure switch.
105 * NOTE: default setting corresponds to the minimum number of buffers
106 * that postmaster.c will allow for the default MaxBackends value.
108 #define DEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
111 * Size of a disk block --- this also limits the size of a tuple.
112 * You can set it bigger if you need bigger tuples (although TOAST
113 * should reduce the need to have large tuples, since fields can now
114 * be spread across multiple tuples).
116 * The maximum possible value of BLCKSZ is currently 2^15 (32768).
117 * This is determined by the 15-bit widths of the lp_off and lp_len
118 * fields in ItemIdData (see include/storage/itemid.h).
120 * CAUTION: changing BLCKSZ requires an initdb.
125 * RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
126 * Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
127 * relations bigger than that are divided into multiple files.
129 * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file
130 * size. This is typically 2Gb or 4Gb in a 32-bit operating system. By
131 * default, we make the limit 1Gb to avoid any possible integer-overflow
132 * problems within the OS. A limit smaller than necessary only means we
133 * divide a large relation into more chunks than necessary, so it seems
134 * best to err in the direction of a small limit. (Besides, a power-of-2
135 * value saves a few cycles in md.c.)
137 * CAUTION: changing RELSEG_SIZE requires an initdb.
139 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
142 * Maximum number of columns in an index and maximum number of arguments
143 * to a function. They must be the same value.
145 * The minimum value is 8 (index creation uses 8-argument functions).
146 * There is no specific upper limit, although large values will waste
147 * system-table space and processing time.
149 * CAUTION: changing these requires an initdb.
151 * BTW: if you need to call dynamically-loaded old-style C functions that
152 * have more than 16 arguments, you will also need to add cases to the
153 * switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
154 * But consider converting such functions to new-style instead...
156 #define INDEX_MAX_KEYS 16
157 #define FUNC_MAX_ARGS INDEX_MAX_KEYS
160 * Define this to make libpgtcl's "pg_result -assign" command process C-style
161 * backslash sequences in returned tuple data and convert Postgres array
162 * attributes into Tcl lists. CAUTION: this conversion is *wrong* unless
163 * you install the routines in contrib/string/string_io to make the backend
164 * produce C-style backslash sequences in the first place.
166 /* #define TCL_ARRAYS */
169 * User locks are handled totally on the application side as long term
170 * cooperative locks which extend beyond the normal transaction boundaries.
171 * Their purpose is to indicate to an application that someone is `working'
172 * on an item. Define this flag to enable user locks. You will need the
173 * loadable module user-locks.c to use this feature.
178 * Define this if you want psql to _always_ ask for a username and a password
179 * for password authentication.
181 /* #define PSQL_ALWAYS_GET_PASSWORDS */
184 * Define this if you want to allow the lo_import and lo_export SQL functions
185 * to be executed by ordinary users. By default these functions are only
186 * available to the Postgres superuser. CAUTION: these functions are
187 * SECURITY HOLES since they can read and write any file that the Postgres
188 * backend has permission to access. If you turn this on, don't say we
191 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
194 * Use btree bulkload code:
195 * this code is moderately slow (~10% slower) compared to the regular
196 * btree (insertion) build code on sorted or well-clustered data. on
197 * random data, however, the insertion build code is unusable -- the
198 * difference on a 60MB heap is a factor of 15 because the random
199 * probes into the btree thrash the buffer pool.
201 * Great thanks to Paul M. Aoki (aoki@CS.Berkeley.EDU)
203 #define FASTBUILD /* access/nbtree/nbtsort.c */
206 * MAXPGPATH: standard size of a pathname buffer in Postgres (hence,
207 * maximum usable pathname length is one less).
209 * We'd use a standard system header symbol for this, if there weren't
210 * so many to choose from: MAXPATHLEN, _POSIX_PATH_MAX, MAX_PATH, PATH_MAX
211 * are all defined by different "standards", and often have different
212 * values on the same platform! So we just punt and use a reasonably
213 * generous setting here.
215 #define MAXPGPATH 1024
218 * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
220 #define DEFAULT_MAX_EXPR_DEPTH 10000
223 * You can try changing this if you have a machine with bytes of another
224 * size, but no guarantee...
226 #define BITS_PER_BYTE 8
229 * Define this if your operating system supports AF_UNIX family sockets.
231 #if !defined(__QNX__) && !defined(__BEOS__)
232 # define HAVE_UNIX_SOCKETS 1
236 * This is the default directory in which AF_UNIX socket files are placed.
237 * Caution: changing this risks breaking your existing client applications,
238 * which are likely to continue to look in the old directory. But if you
239 * just hate the idea of sockets in /tmp, here's where to twiddle it.
240 * You can also override this at runtime with the postmaster's -k switch.
242 #define DEFAULT_PGSOCKET_DIR "/tmp"
246 *------------------------------------------------------------------------
247 * These hand-configurable symbols are for enabling debugging code,
248 * not for controlling user-visible features or resource limits.
249 *------------------------------------------------------------------------
252 /* Define this to cause pfree()'d memory to be cleared immediately,
253 * to facilitate catching bugs that refer to already-freed values.
254 * XXX For 7.1 development, define this automatically if --enable-cassert.
255 * In the long term it probably doesn't need to be on by default.
257 #ifdef USE_ASSERT_CHECKING
258 #define CLOBBER_FREED_MEMORY
261 /* Define this to check memory allocation errors (scribbling on more
262 * bytes than were allocated).
263 * XXX For 7.1 development, define this automatically if --enable-cassert.
264 * In the long term it probably doesn't need to be on by default.
266 #ifdef USE_ASSERT_CHECKING
267 #define MEMORY_CONTEXT_CHECKING
270 /* Define this to force all parse and plan trees to be passed through
271 * copyObject(), to facilitate catching errors and omissions in copyObject().
273 /* #define COPY_PARSE_PLAN_TREES */
275 /* Enable debugging print statements in the date/time support routines. */
276 /* #define DATEDEBUG */
278 /* Enable debugging print statements for lock-related operations. */
279 /* #define LOCK_DEBUG */
282 * Other debug #defines (documentation, anyone?)
284 /* #define IPORTAL_DEBUG */
285 /* #define HEAPDEBUGALL */
286 /* #define ISTRATDEBUG */
287 /* #define ACLDEBUG */
288 /* #define RTDEBUG */
289 /* #define GISTDEBUG */
290 /* #define OMIT_PARTIAL_INDEX */
293 * defining unsafe floats will make float4 and float8 ops faster
294 * by suppressing overflow/underflow checks.
296 /* #define UNSAFE_FLOATS */
300 *------------------------------------------------------------------------
301 * Part 3: system configuration information that is auto-detected by
302 * configure. In theory you shouldn't have to touch any of this stuff
303 * by hand. In the real world, configure might get it wrong...
304 *------------------------------------------------------------------------
307 /* Define const as empty if your compiler doesn't grok const. */
310 /* Define as your compiler's spelling of "inline", or empty if no inline. */
313 /* Define as empty if the C compiler doesn't understand "signed". */
316 /* Define as empty if the C compiler doesn't understand "volatile". */
319 /* Define if your cpp understands the ANSI stringizing operators in macros */
320 #undef HAVE_STRINGIZE
322 /* Set to 1 if you have <crypt.h> */
325 /* Set to 1 if you have <dld.h> */
328 /* Set to 1 if you have <endian.h> */
331 /* Set to 1 if you have <fp_class.h> */
332 #undef HAVE_FP_CLASS_H
334 /* Set to 1 if you have <getopt.h> */
337 /* Set to 1 if you have <history.h> */
338 #undef HAVE_HISTORY_H
340 /* Set to 1 if you have <ieeefp.h> */
343 /* Set to 1 if you have <netinet/tcp.h> */
344 #undef HAVE_NETINET_TCP_H
346 /* Set to 1 if you have <readline.h> */
347 #undef HAVE_READLINE_H
349 /* Set to 1 if you have <readline/history.h> */
350 #undef HAVE_READLINE_HISTORY_H
352 /* Set to 1 if you have <readline/readline.h> */
353 #undef HAVE_READLINE_READLINE_H
355 /* Set to 1 if you have <sys/ipc.h> */
356 #undef HAVE_SYS_IPC_H
358 /* Set to 1 if you have <sys/select.h> */
359 #undef HAVE_SYS_SELECT_H
361 /* Set to 1 if you have <sys/un.h> */
364 /* Set to 1 if you have <sys/sem.h> */
365 #undef HAVE_SYS_SEM_H
367 /* Set to 1 if you have <sys/shm.h> */
368 #undef HAVE_SYS_SHM_H
370 /* Set to 1 if you have <kernel/OS.h> */
371 #undef HAVE_KERNEL_OS_H
373 /* Set to 1 if you have <SupportDefs.h> */
374 #undef HAVE_SUPPORTDEFS_H
376 /* Set to 1 if you have <kernel/image.h> */
377 #undef HAVE_KERNEL_IMAGE_H
379 /* Set to 1 if you have <termios.h> */
380 #undef HAVE_TERMIOS_H
382 /* Set to 1 if you have <sys/pstat.h> */
383 #undef HAVE_SYS_PSTAT_H
385 /* Define if string.h and strings.h may both be included */
386 #undef STRING_H_WITH_STRINGS_H
388 /* Define if you have the setproctitle function. */
389 #undef HAVE_SETPROCTITLE
391 /* Define if you have the pstat function. */
394 /* Define if the PS_STRINGS thing exists. */
395 #undef HAVE_PS_STRINGS
397 /* Define if you have the stricmp function. */
400 /* Set to 1 if you have history functions (either in libhistory or libreadline) */
401 #undef HAVE_HISTORY_FUNCTIONS
403 /* Set to 1 if you have <pwd.h> */
406 /* Set to 1 if you have gettimeofday(a) instead of gettimeofday(a,b) */
407 #undef GETTIMEOFDAY_1ARG
408 #ifdef GETTIMEOFDAY_1ARG
409 # define gettimeofday(a,b) gettimeofday(a)
412 /* Set to 1 if you have snprintf() in the C library */
415 /* Set to 1 if your standard system headers declare snprintf() */
416 #undef HAVE_SNPRINTF_DECL
418 /* Set to 1 if you have vsnprintf() in the C library */
419 #undef HAVE_VSNPRINTF
421 /* Set to 1 if your standard system headers declare vsnprintf() */
422 #undef HAVE_VSNPRINTF_DECL
424 /* Set to 1 if you have strerror() */
427 /* Set to 1 if you have isinf() */
430 extern int isinf(double x);
434 * These are all related to port/isinf.c
438 #undef HAVE_FP_CLASS_H
439 #undef HAVE_FP_CLASS_D
442 /* Set to 1 if you have gethostname() */
443 #undef HAVE_GETHOSTNAME
444 #ifndef HAVE_GETHOSTNAME
445 extern int gethostname(char *name, int namelen);
448 /* Set to 1 if struct tm has a tm_zone member */
451 /* Set to 1 if you have int timezone.
452 * NOTE: if both tm_zone and a global timezone variable exist,
453 * using the tm_zone field should probably be preferred,
454 * since global variables are inherently not thread-safe.
456 #undef HAVE_INT_TIMEZONE
458 /* Set to 1 if you have cbrt() */
461 /* Set to 1 if you have inet_aton() */
462 #undef HAVE_INET_ATON
464 #ifndef HAVE_INET_ATON
465 # include <sys/types.h>
466 # include <netinet/in.h>
467 # include <arpa/inet.h>
468 extern int inet_aton(const char *cp, struct in_addr * addr);
471 /* Set to 1 if you have fcvt() */
474 /* Set to 1 if you have rint() */
477 /* Set to 1 if you have finite() */
480 /* Set to 1 if you have memmove() */
483 /* Set to 1 if you have sigsetjmp() */
484 #undef HAVE_SIGSETJMP
487 * When there is no sigsetjmp, its functionality is provided by plain
488 * setjmp. Incidentally, nothing provides setjmp's functionality in
491 #ifndef HAVE_SIGSETJMP
492 # define sigjmp_buf jmp_buf
493 # define sigsetjmp(x,y) setjmp(x)
494 # define siglongjmp longjmp
497 /* Set to 1 if you have sysconf() */
500 /* Set to 1 if you have getrusage() */
501 #undef HAVE_GETRUSAGE
503 /* Set to 1 if you have waitpid() */
506 /* Set to 1 if you have setsid() */
509 /* Set to 1 if you have sigprocmask() */
510 #undef HAVE_SIGPROCMASK
512 /* Set to 1 if you have sigprocmask() */
513 #undef HAVE_STRCASECMP
514 #ifndef HAVE_STRCASECMP
515 extern int strcasecmp(char *s1, char *s2);
518 /* Set to 1 if you have strtol() */
521 /* Set to 1 if you have strtoul() */
524 /* Set to 1 if you have strdup() */
527 extern char *strdup(char const *);
530 /* Set to 1 if you have random() */
533 extern long random(void);
536 /* Set to 1 if you have srandom() */
539 extern void srandom(unsigned int seed);
542 /* The random() function is expected to yield values 0 .. MAX_RANDOM_VALUE */
543 /* Currently, all known implementations yield 0..2^31-1, so we just hardwire
544 * this constant. We could do a configure test if it proves to be necessary.
545 * CAUTION: Think not to replace this with RAND_MAX. RAND_MAX defines the
546 * maximum value of the older rand() function, which is often different from
547 * --- and considerably inferior to --- random().
549 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
551 /* Set to 1 if you have libz.a */
554 /* Set to 1 if you have libreadline.a */
555 #undef HAVE_LIBREADLINE
557 /* Set to 1 if you have libhistory.a */
558 #undef HAVE_LIBHISTORY
560 /* Set to 1 if your libreadline defines rl_completion_append_character */
561 #undef HAVE_RL_COMPLETION_APPEND_CHARACTER
563 /* Set to 1 if filename_completion_function is declared in the readline header */
564 #undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
566 /* Set to 1 if you have getopt_long() (GNU long options) */
567 #undef HAVE_GETOPT_LONG
569 /* Set to 1 if you have union semun */
570 #undef HAVE_UNION_SEMUN
572 /* Set to 1 if you have struct sockaddr_un */
573 #undef HAVE_STRUCT_SOCKADDR_UN
575 /* Set to 1 if type "long int" works and is 64 bits */
576 #undef HAVE_LONG_INT_64
578 /* Set to 1 if type "long long int" works and is 64 bits */
579 #undef HAVE_LONG_LONG_INT_64
581 /* Define this as the appropriate snprintf format for 64-bit ints, if any */
585 * We need a #define symbol for sizeof(Datum) for use in some #if tests.
590 * These must be defined as the alignment requirement (NOT the size) of
591 * each of the basic C data types (except char, which we assume has align 1).
592 * MAXIMUM_ALIGNOF is the largest alignment requirement for any C data type.
593 * ALIGNOF_LONG_LONG_INT need only be defined if HAVE_LONG_LONG_INT_64 is.
598 #undef ALIGNOF_LONG_LONG_INT
599 #undef ALIGNOF_DOUBLE
600 #undef MAXIMUM_ALIGNOF
602 /* Define as the type of the 3rd argument to accept() */
603 #undef ACCEPT_TYPE_ARG3
605 /* Define if POSIX signal interface is available */
606 #undef HAVE_POSIX_SIGNALS
608 /* Define if C++ compiler accepts "using namespace std" */
609 #undef HAVE_NAMESPACE_STD
611 /* Define if C++ compiler accepts "#include <string>" */
612 #undef HAVE_CXX_STRING_HEADER
614 /* Define if you have dlopen() */
617 /* Define if you have the optreset variable */
618 #undef HAVE_INT_OPTRESET
620 /* Define if you have the sys_nerr global variable */
623 /* Define if you have strtoll() */
626 /* Define if you have strtoq() */
629 /* If strtoq() exists, rename it to the more standard strtoll() */
630 #if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOLL) && defined(HAVE_STRTOQ)
631 # define strtoll strtoq
632 # define HAVE_STRTOLL 1
635 /* Define if you have strtoull() */
638 /* Define if you have strtouq() */
641 /* If strtouq() exists, rename it to the more standard strtoull() */
642 #if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOULL) && defined(HAVE_STRTOUQ)
643 # define strtoull strtouq
644 # define HAVE_STRTOULL 1
649 *------------------------------------------------------------------------
650 * Part 4: pull in system-specific declarations.
652 * This is still configure's responsibility, because it picks where
653 * the "os.h" symlink points...
654 *------------------------------------------------------------------------
658 * Pull in OS-specific declarations (using link created by configure)
664 * The following is used as the arg list for signal handlers. Any ports
665 * that take something other than an int argument should override this in
666 * the port-specific os.h file. Note that variable names are required
667 * because it is used in both the prototypes as well as the definitions.
668 * Note also the long name. We expect that this won't collide with
669 * other names causing compiler warnings.
673 #define SIGNAL_ARGS int postgres_signal_arg
677 #endif /* CONFIG_H */