2 * PostgreSQL configuration-settings file.
4 * pg_config.h.in is processed by configure to produce pg_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 pg_config.h.in before running configure,
8 * or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
9 * changes will be overwritten the next time you run configure.
11 * $Id: pg_config.h.in,v 1.29 2002/08/29 08:03:22 ishii 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-integer-datetimes
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 64-bit integer timestamp and interval support (--enable-integer-datetimes) */
37 #undef USE_INTEGER_DATETIMES
39 /* Set to 1 if you want cyrillic recode (--enable-recode) */
42 /* Set to 1 if you want ASSERT checking (--enable-cassert) */
43 #undef USE_ASSERT_CHECKING
45 /* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
48 /* Define to build with Kerberos 5 support (--with-krb5[=DIR]) */
51 /* Kerberos name of the Postgres service principal (--with-krb-srvnam=NAME) */
54 /* Define to build with (Open)SSL support (--with-openssl[=DIR]) */
57 /* Define to build with PAM Support */
61 * DEF_PGPORT is the TCP port number on which the Postmaster listens and
62 * which clients will try to connect to. This is just a default value;
63 * it can be overridden at postmaster or client startup. It's awfully
64 * convenient if your clients have the right default compiled in, though.
65 * (--with-pgport=PORTNUM)
68 /* ... and once more as a string constant instead */
72 * Default soft limit on number of backend server processes per postmaster;
73 * this is just the default setting for the postmaster's -N switch.
74 * (--with-maxbackends=N)
76 #undef DEF_MAXBACKENDS
81 /* location of locale files */
84 /* Define to build the ODBC driver for unixODBC */
87 /* Define to build the ODBC driver for iODBC */
92 *------------------------------------------------------------------------
93 * Part 2: feature symbols and limits that are user-configurable, but
94 * only by editing this file ... there's no configure support for them.
96 * Editing this file and doing a full rebuild (and an initdb if noted)
97 * should be sufficient to change any of these.
98 *------------------------------------------------------------------------
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 * BLCKSZ must be a power of 2.
117 * The maximum possible value of BLCKSZ is currently 2^15 (32768).
118 * This is determined by the 15-bit widths of the lp_off and lp_len
119 * fields in ItemIdData (see include/storage/itemid.h).
121 * CAUTION: changing BLCKSZ requires an initdb.
126 * RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
127 * Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
128 * relations bigger than that are divided into multiple files.
130 * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file
131 * size. This is typically 2Gb or 4Gb in a 32-bit operating system. By
132 * default, we make the limit 1Gb to avoid any possible integer-overflow
133 * problems within the OS. A limit smaller than necessary only means we
134 * divide a large relation into more chunks than necessary, so it seems
135 * best to err in the direction of a small limit. (Besides, a power-of-2
136 * value saves a few cycles in md.c.)
138 * CAUTION: changing RELSEG_SIZE requires an initdb.
140 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
143 * Maximum number of columns in an index and maximum number of arguments
144 * to a function. They must be the same value.
146 * The minimum value is 8 (index creation uses 8-argument functions).
147 * There is no specific upper limit, although large values will waste
148 * system-table space and processing time.
150 * CAUTION: changing these requires an initdb.
152 * BTW: if you need to call dynamically-loaded old-style C functions that
153 * have more than 16 arguments, you will also need to add cases to the
154 * switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
155 * But consider converting such functions to new-style instead...
157 #define INDEX_MAX_KEYS 32
158 #define FUNC_MAX_ARGS INDEX_MAX_KEYS
161 * Define this to make libpgtcl's "pg_result -assign" command process C-style
162 * backslash sequences in returned tuple data and convert Postgres array
163 * attributes into Tcl lists. CAUTION: this conversion is *wrong* unless
164 * you install the routines in contrib/string/string_io to make the backend
165 * produce C-style backslash sequences in the first place.
167 /* #define TCL_ARRAYS */
170 * User locks are handled totally on the application side as long term
171 * cooperative locks which extend beyond the normal transaction boundaries.
172 * Their purpose is to indicate to an application that someone is `working'
173 * on an item. Define this flag to enable user locks. You will need the
174 * loadable module user-locks.c to use this feature.
179 * Define this if you want psql to _always_ ask for a username and a password
180 * for password authentication.
182 /* #define PSQL_ALWAYS_GET_PASSWORDS */
185 * Define this if you want to allow the lo_import and lo_export SQL functions
186 * to be executed by ordinary users. By default these functions are only
187 * available to the Postgres superuser. CAUTION: these functions are
188 * SECURITY HOLES since they can read and write any file that the Postgres
189 * backend has permission to access. If you turn this on, don't say we
192 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
195 * Use btree bulkload code:
196 * this code is moderately slow (~10% slower) compared to the regular
197 * btree (insertion) build code on sorted or well-clustered data. on
198 * random data, however, the insertion build code is unusable -- the
199 * difference on a 60MB heap is a factor of 15 because the random
200 * probes into the btree thrash the buffer pool.
202 * Great thanks to Paul M. Aoki (aoki@CS.Berkeley.EDU)
204 #define FASTBUILD /* access/nbtree/nbtsort.c */
207 * MAXPGPATH: standard size of a pathname buffer in Postgres (hence,
208 * maximum usable pathname length is one less).
210 * We'd use a standard system header symbol for this, if there weren't
211 * so many to choose from: MAXPATHLEN, _POSIX_PATH_MAX, MAX_PATH, PATH_MAX
212 * are all defined by different "standards", and often have different
213 * values on the same platform! So we just punt and use a reasonably
214 * generous setting here.
216 #define MAXPGPATH 1024
219 * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
221 #define DEFAULT_MAX_EXPR_DEPTH 10000
224 * PG_SOMAXCONN: maximum accept-queue length limit passed to listen(2).
225 * You'd think we should use SOMAXCONN from <sys/socket.h>, but on many
226 * systems that symbol is much smaller than the kernel's actual limit.
227 * In any case, this symbol need be twiddled only if you have a kernel
228 * that refuses large limit values, rather than silently reducing the
229 * value to what it can handle (which is what most if not all Unixen do).
231 #define PG_SOMAXCONN 10000
234 * You can try changing this if you have a machine with bytes of another
235 * size, but no guarantee...
237 #define BITS_PER_BYTE 8
240 * Define this if your operating system supports AF_UNIX family sockets.
242 #if !defined(__QNX__) && !defined(__BEOS__)
243 # define HAVE_UNIX_SOCKETS 1
247 * This is the default directory in which AF_UNIX socket files are placed.
248 * Caution: changing this risks breaking your existing client applications,
249 * which are likely to continue to look in the old directory. But if you
250 * just hate the idea of sockets in /tmp, here's where to twiddle it.
251 * You can also override this at runtime with the postmaster's -k switch.
253 #define DEFAULT_PGSOCKET_DIR "/tmp"
257 *------------------------------------------------------------------------
258 * These hand-configurable symbols are for enabling debugging code,
259 * not for controlling user-visible features or resource limits.
260 *------------------------------------------------------------------------
263 /* Define this to cause pfree()'d memory to be cleared immediately,
264 * to facilitate catching bugs that refer to already-freed values.
265 * XXX For 7.1 development, define this automatically if --enable-cassert.
266 * In the long term it probably doesn't need to be on by default.
268 #ifdef USE_ASSERT_CHECKING
269 #define CLOBBER_FREED_MEMORY
272 /* Define this to check memory allocation errors (scribbling on more
273 * bytes than were allocated).
274 * XXX For 7.1 development, define this automatically if --enable-cassert.
275 * In the long term it probably doesn't need to be on by default.
277 #ifdef USE_ASSERT_CHECKING
278 #define MEMORY_CONTEXT_CHECKING
281 /* Define this to force all parse and plan trees to be passed through
282 * copyObject(), to facilitate catching errors and omissions in copyObject().
284 /* #define COPY_PARSE_PLAN_TREES */
286 /* Enable debugging print statements in the date/time support routines. */
287 /* #define DATEDEBUG */
289 /* Enable debugging print statements for lock-related operations. */
290 /* #define LOCK_DEBUG */
293 * Other debug #defines (documentation, anyone?)
295 /* #define IPORTAL_DEBUG */
296 /* #define HEAPDEBUGALL */
297 /* #define ISTRATDEBUG */
298 /* #define ACLDEBUG */
299 /* #define RTDEBUG */
300 /* #define GISTDEBUG */
302 * DEBUG_TUPLE_ACCESS enables paranoid assertions during
303 * elimination of oids from the fixed sized part of HeapTupleHeader.
304 * This is expected to be undef'd after v7.3 release at the latest.
306 #define DEBUG_TUPLE_ACCESS
309 * defining unsafe floats will make float4 and float8 ops faster
310 * by suppressing overflow/underflow checks.
312 /* #define UNSAFE_FLOATS */
316 *------------------------------------------------------------------------
317 * Part 3: system configuration information that is auto-detected by
318 * configure. In theory you shouldn't have to touch any of this stuff
319 * by hand. In the real world, configure might get it wrong...
320 *------------------------------------------------------------------------
323 /* Define const as empty if your compiler doesn't grok const. */
326 /* Define as your compiler's spelling of "inline", or empty if no inline. */
329 /* Define as empty if the C compiler doesn't understand "signed". */
332 /* Define as empty if the C compiler doesn't understand "volatile". */
335 /* Define if your cpp understands the ANSI stringizing operators in macros */
336 #undef HAVE_STRINGIZE
338 /* Set to 1 if you have <crypt.h> */
341 /* Set to 1 if you have <dld.h> */
344 /* Set to 1 if you have <endian.h> */
347 /* Set to 1 if you have <fp_class.h> */
348 #undef HAVE_FP_CLASS_H
350 /* Set to 1 if you have <getopt.h> */
353 /* Set to 1 if you have <history.h> */
354 #undef HAVE_HISTORY_H
356 /* Set to 1 if you have <ieeefp.h> */
359 /* Set to 1 if you have <netinet/tcp.h> */
360 #undef HAVE_NETINET_TCP_H
362 /* Set to 1 if you have <readline.h> */
363 #undef HAVE_READLINE_H
365 /* Set to 1 if you have <readline/history.h> */
366 #undef HAVE_READLINE_HISTORY_H
368 /* Set to 1 if you have <readline/readline.h> */
369 #undef HAVE_READLINE_READLINE_H
371 /* Set to 1 if you have <sys/ipc.h> */
372 #undef HAVE_SYS_IPC_H
374 /* Set to 1 if you have <sys/select.h> */
375 #undef HAVE_SYS_SELECT_H
377 /* Set to 1 if you have <sys/un.h> */
380 /* Set to 1 if you have <sys/sem.h> */
381 #undef HAVE_SYS_SEM_H
383 /* Set to 1 if you have <sys/shm.h> */
384 #undef HAVE_SYS_SHM_H
386 /* Set to 1 if you have <kernel/OS.h> */
387 #undef HAVE_KERNEL_OS_H
389 /* Set to 1 if you have <SupportDefs.h> */
390 #undef HAVE_SUPPORTDEFS_H
392 /* Set to 1 if you have <kernel/image.h> */
393 #undef HAVE_KERNEL_IMAGE_H
395 /* Set to 1 if you have <termios.h> */
396 #undef HAVE_TERMIOS_H
398 /* Set to 1 if you have <sys/pstat.h> */
399 #undef HAVE_SYS_PSTAT_H
401 /* Define to 1 if you have strings.h */
402 #undef HAVE_STRINGS_H
404 /* Define if you have the setproctitle function. */
405 #undef HAVE_SETPROCTITLE
407 /* Define if you have the pstat function. */
410 /* Define if the PS_STRINGS thing exists. */
411 #undef HAVE_PS_STRINGS
413 /* Define if you have the stricmp function. */
416 /* Set to 1 if you have <pwd.h> */
419 /* Set to 1 if you have gettimeofday(a) instead of gettimeofday(a,b) */
420 #undef GETTIMEOFDAY_1ARG
421 #ifdef GETTIMEOFDAY_1ARG
422 # define gettimeofday(a,b) gettimeofday(a)
425 /* Set to 1 if you have snprintf() in the C library */
428 /* Set to 1 if your standard system headers declare snprintf() */
429 #undef HAVE_DECL_SNPRINTF
431 /* Set to 1 if you have vsnprintf() in the C library */
432 #undef HAVE_VSNPRINTF
434 /* Set to 1 if your standard system headers declare vsnprintf() */
435 #undef HAVE_DECL_VSNPRINTF
437 /* Set to 1 if you have strerror() */
440 /* Set to 1 if you have isinf() */
443 extern int isinf(double x);
447 * These are all related to port/isinf.c
451 #undef HAVE_FP_CLASS_H
452 #undef HAVE_FP_CLASS_D
455 /* Set to 1 if you have gethostname() */
456 #undef HAVE_GETHOSTNAME
457 #ifndef HAVE_GETHOSTNAME
458 extern int gethostname(char *name, int namelen);
461 /* Set to 1 if struct tm has a tm_zone member */
464 /* Set to 1 if you have int timezone.
465 * NOTE: if both tm_zone and a global timezone variable exist,
466 * using the tm_zone field should probably be preferred,
467 * since global variables are inherently not thread-safe.
469 #undef HAVE_INT_TIMEZONE
471 /* Set to 1 if you have cbrt() */
474 /* Set to 1 if you have inet_aton() */
475 #undef HAVE_INET_ATON
477 #ifndef HAVE_INET_ATON
478 # include <sys/types.h>
479 # include <netinet/in.h>
480 # include <arpa/inet.h>
481 extern int inet_aton(const char *cp, struct in_addr * addr);
484 /* Set to 1 if you have fcvt() */
487 /* Set to 1 if you have rint() */
490 /* Set to 1 if you have finite() */
493 /* Set to 1 if you have memmove() */
496 /* Set to 1 if you have sigsetjmp() */
497 #undef HAVE_SIGSETJMP
500 * When there is no sigsetjmp, its functionality is provided by plain
501 * setjmp. Incidentally, nothing provides setjmp's functionality in
504 #ifndef HAVE_SIGSETJMP
505 # define sigjmp_buf jmp_buf
506 # define sigsetjmp(x,y) setjmp(x)
507 # define siglongjmp longjmp
510 /* Set to 1 if you have sysconf() */
513 /* Set to 1 if you have getrusage() */
514 #undef HAVE_GETRUSAGE
516 /* Set to 1 if you have waitpid() */
519 /* Set to 1 if you have setsid() */
522 /* Set to 1 if you have sigprocmask() */
523 #undef HAVE_SIGPROCMASK
525 /* Set to 1 if you have sigprocmask() */
526 #undef HAVE_STRCASECMP
527 #ifndef HAVE_STRCASECMP
528 extern int strcasecmp(char *s1, char *s2);
531 /* Set to 1 if you have strtol() */
534 /* Set to 1 if you have strtoul() */
537 /* Set to 1 if you have strdup() */
540 extern char *strdup(char const *);
543 /* Set to 1 if you have random() */
546 extern long random(void);
549 /* Set to 1 if you have srandom() */
552 extern void srandom(unsigned int seed);
555 /* The random() function is expected to yield values 0 .. MAX_RANDOM_VALUE */
556 /* Currently, all known implementations yield 0..2^31-1, so we just hardwire
557 * this constant. We could do a configure test if it proves to be necessary.
558 * CAUTION: Think not to replace this with RAND_MAX. RAND_MAX defines the
559 * maximum value of the older rand() function, which is often different from
560 * --- and considerably inferior to --- random().
562 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
564 /* Define if you have dlopen() */
567 /* Define if you have fdatasync() */
568 #undef HAVE_FDATASYNC
570 /* Define if the standard header unistd.h declares fdatasync() */
571 #undef HAVE_DECL_FDATASYNC
573 #if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
574 extern int fdatasync(int fildes);
577 /* Set to 1 if you have libz.a */
580 /* Set to 1 if you have libreadline.a */
581 #undef HAVE_LIBREADLINE
583 /* Set to 1 if your libreadline defines rl_completion_append_character */
584 #undef HAVE_RL_COMPLETION_APPEND_CHARACTER
586 /* Set to 1 if you have rl_completion_matches */
587 #undef HAVE_RL_COMPLETION_MATCHES
589 /* Set to 1 if you have rl_filename_completion_function */
590 #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION
592 /* Set to 1 if you have getopt_long() (GNU long options) */
593 #undef HAVE_GETOPT_LONG
595 /* Set to 1 if you have union semun */
596 #undef HAVE_UNION_SEMUN
598 /* Set to 1 if you have struct cmsgcred */
599 #undef HAVE_STRUCT_CMSGCRED
601 /* Set to 1 if you have struct fcred */
602 #undef HAVE_STRUCT_FCRED
604 /* Set to 1 if you have struct sockcred */
605 #undef HAVE_STRUCT_SOCKCRED
607 /* Set to 1 if you have struct sockaddr_un */
608 #undef HAVE_STRUCT_SOCKADDR_UN
610 /* Set to 1 if you have krb5_ticket.enc_part2 */
611 #undef HAVE_KRB5_TICKET_ENC_PART2
613 /* Set to 1 if you have krb5_ticket.client */
614 #undef HAVE_KRB5_TICKET_CLIENT
616 /* Set to 1 if you have krb5_error.text.data */
617 #undef HAVE_KRB5_ERROR_TEXT_DATA
619 /* Set to 1 if you have krb5_ticket.e_data */
620 #undef HAVE_KRB5_ERROR_E_DATA
622 /* Set to 1 if type "long int" works and is 64 bits */
623 #undef HAVE_LONG_INT_64
625 /* Set to 1 if type "long long int" works and is 64 bits */
626 #undef HAVE_LONG_LONG_INT_64
628 /* Set to 1 if type "long long int" constants should be suffixed by LL */
629 #undef HAVE_LL_CONSTANTS
631 /* Define this as the appropriate snprintf format for 64-bit ints, if any */
635 * We need a #define symbol for sizeof(Datum) for use in some #if tests.
640 * These must be defined as the alignment requirement (NOT the size) of
641 * each of the basic C data types (except char, which we assume has align 1).
642 * MAXIMUM_ALIGNOF is the largest alignment requirement for any C data type.
643 * ALIGNOF_LONG_LONG_INT need only be defined if HAVE_LONG_LONG_INT_64 is.
648 #undef ALIGNOF_LONG_LONG_INT
649 #undef ALIGNOF_DOUBLE
650 #undef MAXIMUM_ALIGNOF
652 /* Define as the type of the 3rd argument to accept() */
653 #undef ACCEPT_TYPE_ARG3
655 /* Define if POSIX signal interface is available */
656 #undef HAVE_POSIX_SIGNALS
658 /* Define if C++ compiler accepts "using namespace std" */
659 #undef HAVE_NAMESPACE_STD
661 /* Define if C++ compiler accepts "#include <string>" */
662 #undef HAVE_CXX_STRING_HEADER
664 /* Define if you have the optreset variable */
665 #undef HAVE_INT_OPTRESET
667 /* Define if you have strtoll() */
670 /* Define if you have strtoq() */
673 /* If strtoq() exists, rename it to the more standard strtoll() */
674 #if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOLL) && defined(HAVE_STRTOQ)
675 # define strtoll strtoq
676 # define HAVE_STRTOLL 1
679 /* Define if you have strtoull() */
682 /* Define if you have strtouq() */
685 /* If strtouq() exists, rename it to the more standard strtoull() */
686 #if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOULL) && defined(HAVE_STRTOUQ)
687 # define strtoull strtouq
688 # define HAVE_STRTOULL 1
691 /* Define if you have atexit() */
694 /* Define if you have on_exit() */
697 /* Define if the corresponding types are defined in standard headers */
702 #undef HAVE_SIG_ATOMIC_T
704 /* Define if you have syslog() */
707 /* Define exactly one of these symbols to select semaphore implementation */
708 #undef USE_NAMED_POSIX_SEMAPHORES
709 #undef USE_UNNAMED_POSIX_SEMAPHORES
710 #undef USE_SYSV_SEMAPHORES
712 /* Define exactly one of these symbols to select shared-mem implementation */
713 #undef USE_SYSV_SHARED_MEMORY
715 /* Define to 1 to make fseeko visible on some hosts. */
716 #undef _LARGEFILE_SOURCE
718 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
722 #define fseeko(a, b, c) fseek((a), (b), (c))
723 #define ftello(a) ftell((a))
726 /* Number of bits in a file offset, on hosts where this is settable. */
727 #undef _FILE_OFFSET_BITS
729 /* Define for large files, on AIX-style hosts. */
734 *------------------------------------------------------------------------
735 * Part 4: pull in system-specific declarations.
737 * This is still configure's responsibility, because it picks where
738 * the "pg_config_os.h" symlink points...
739 *------------------------------------------------------------------------
743 * Pull in OS-specific declarations (using link created by configure)
746 #include "pg_config_os.h"
749 * Provide default definitions for things that port-specific pg_config_os.h
750 * files can set, but typically don't.
754 #define DLLIMPORT /* no special DLL markers on most ports */
758 * The following is used as the arg list for signal handlers. Any ports
759 * that take something other than an int argument should override this in
760 * their pg_config_os.h file. Note that variable names are required
761 * because it is used in both the prototypes as well as the definitions.
762 * Note also the long name. We expect that this won't collide with
763 * other names causing compiler warnings.
767 #define SIGNAL_ARGS int postgres_signal_arg
771 #endif /* PG_CONFIG_H */