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.140 2000/10/03 19:50:21 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 ASSERT checking (--enable-cassert) */
46 #undef USE_ASSERT_CHECKING
48 /* Set to 1 to use syslog() to write postmaster log (--enable-syslog) */
49 /* (CAUTION: large log entries confuse syslog on many platforms!) */
52 /* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
55 /* Define to build with Kerberos 5 support (--with-krb5[=DIR]) */
58 /* Kerberos name of the Postgres service principal (--with-krb-srvnam=NAME) */
61 /* Define to build with (Open)SSL support (--with-openssl[=DIR]) */
65 * DEF_PGPORT is the TCP port number on which the Postmaster listens and
66 * which clients will try to connect to. This is just a default value;
67 * it can be overridden at postmaster or client startup. It's awfully
68 * convenient if your clients have the right default compiled in, though.
69 * (--with-pgport=PORTNUM)
72 /* ... and once more as a string constant instead */
76 * Default soft limit on number of backend server processes per postmaster;
77 * this is just the default setting for the postmaster's -N switch.
78 * (--with-maxbackends=N)
80 #undef DEF_MAXBACKENDS
84 *------------------------------------------------------------------------
85 * Part 2: feature symbols and limits that are user-configurable, but
86 * only by editing this file ... there's no configure support for them.
88 * Editing this file and doing a full rebuild (and an initdb if noted)
89 * should be sufficient to change any of these.
90 *------------------------------------------------------------------------
94 * Hard limit on number of backend server processes per postmaster.
95 * Increasing this costs about 32 bytes per process slot as of v 6.5.
97 #define MAXBACKENDS (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
100 * Default number of buffers in shared buffer pool (each of size BLCKSZ).
101 * This is just the default setting for the postmaster's -B switch.
102 * Perhaps it ought to be configurable from a configure switch.
103 * NOTE: default setting corresponds to the minimum number of buffers
104 * that postmaster.c will allow for the default MaxBackends value.
106 #define DEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
109 * Size of a disk block --- this also limits the size of a tuple.
110 * You can set it bigger if you need bigger tuples (although TOAST
111 * should reduce the need to have large tuples, since fields can now
112 * be spread across multiple tuples).
114 * The maximum possible value of BLCKSZ is currently 2^15 (32768).
115 * This is determined by the 15-bit widths of the lp_off and lp_len
116 * fields in ItemIdData (see include/storage/itemid.h).
118 * CAUTION: changing BLCKSZ requires an initdb.
123 * RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
124 * Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
125 * relations bigger than that are divided into multiple files.
127 * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file
128 * size. This is typically 2Gb or 4Gb in a 32-bit operating system. By
129 * default, we make the limit 1Gb to avoid any possible integer-overflow
130 * problems within the OS. A limit smaller than necessary only means we
131 * divide a large relation into more chunks than necessary, so it seems
132 * best to err in the direction of a small limit. (Besides, a power-of-2
133 * value saves a few cycles in md.c.)
135 * CAUTION: changing RELSEG_SIZE requires an initdb.
137 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
140 * Maximum number of columns in an index and maximum number of arguments
141 * to a function. They must be the same value.
143 * The minimum value is 8 (index creation uses 8-argument functions).
144 * There is no specific upper limit, although large values will waste
145 * system-table space and processing time.
147 * CAUTION: changing these requires an initdb.
149 * BTW: if you need to call dynamically-loaded old-style C functions that
150 * have more than 16 arguments, you will also need to add cases to the
151 * switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
152 * But consider converting such functions to new-style instead...
154 #define INDEX_MAX_KEYS 16
155 #define FUNC_MAX_ARGS INDEX_MAX_KEYS
158 * Define this to make libpgtcl's "pg_result -assign" command process C-style
159 * backslash sequences in returned tuple data and convert Postgres array
160 * attributes into Tcl lists. CAUTION: this conversion is *wrong* unless
161 * you install the routines in contrib/string/string_io to make the backend
162 * produce C-style backslash sequences in the first place.
164 /* #define TCL_ARRAYS */
167 * User locks are handled totally on the application side as long term
168 * cooperative locks which extend beyond the normal transaction boundaries.
169 * Their purpose is to indicate to an application that someone is `working'
170 * on an item. Define this flag to enable user locks. You will need the
171 * loadable module user-locks.c to use this feature.
176 * Define this if you want psql to _always_ ask for a username and a password
177 * for password authentication.
179 /* #define PSQL_ALWAYS_GET_PASSWORDS */
182 * Define this if you want to allow the lo_import and lo_export SQL functions
183 * to be executed by ordinary users. By default these functions are only
184 * available to the Postgres superuser. CAUTION: these functions are
185 * SECURITY HOLES since they can read and write any file that the Postgres
186 * backend has permission to access. If you turn this on, don't say we
189 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
192 * Use btree bulkload code:
193 * this code is moderately slow (~10% slower) compared to the regular
194 * btree (insertion) build code on sorted or well-clustered data. on
195 * random data, however, the insertion build code is unusable -- the
196 * difference on a 60MB heap is a factor of 15 because the random
197 * probes into the btree thrash the buffer pool.
199 * Great thanks to Paul M. Aoki (aoki@CS.Berkeley.EDU)
201 #define FASTBUILD /* access/nbtree/nbtsort.c */
204 * MAXPGPATH: standard size of a pathname buffer in Postgres (hence,
205 * maximum usable pathname length is one less).
207 * We'd use a standard system header symbol for this, if there weren't
208 * so many to choose from: MAXPATHLEN, _POSIX_PATH_MAX, MAX_PATH, PATH_MAX
209 * are all defined by different "standards", and often have different
210 * values on the same platform! So we just punt and use a reasonably
211 * generous setting here.
213 #define MAXPGPATH 1024
216 * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
218 #define DEFAULT_MAX_EXPR_DEPTH 10000
221 * You can try changing this if you have a machine with bytes of another
222 * size, but no guarantee...
224 #define BITS_PER_BYTE 8
227 * Define this is your operating system kernel supports AF_UNIX family
230 #if !defined(__CYGWIN__) && !defined(__QNX__)
231 # define HAVE_UNIX_SOCKETS 1
235 *------------------------------------------------------------------------
236 * These hand-configurable symbols are for enabling debugging code,
237 * not for controlling user-visible features or resource limits.
238 *------------------------------------------------------------------------
241 /* Define this to cause pfree()'d memory to be cleared immediately,
242 * to facilitate catching bugs that refer to already-freed values.
243 * XXX For 7.1 development, define this automatically if --enable-cassert.
244 * In the long term it probably doesn't need to be on by default.
246 #ifdef USE_ASSERT_CHECKING
247 #define CLOBBER_FREED_MEMORY
250 /* Define this to check memory leaks
252 #ifdef USE_ASSERT_CHECKING
253 #define MEMORY_CONTEXT_CHECKING
256 /* Define this to force all parse and plan trees to be passed through
257 * copyObject(), to facilitate catching errors and omissions in copyObject().
258 * XXX For 7.1 development, define this automatically if --enable-cassert.
259 * In the long term it probably doesn't need to be on by default.
261 #ifdef USE_ASSERT_CHECKING
262 #define COPY_PARSE_PLAN_TREES
265 /* Enable debugging print statements in the date/time support routines. */
266 /* #define DATEDEBUG */
269 * Other debug #defines (documentation, anyone?)
271 /* #define IPORTAL_DEBUG */
272 /* #define HEAPDEBUGALL */
273 /* #define ISTRATDEBUG */
274 /* #define FASTBUILD_DEBUG */
275 /* #define ACLDEBUG */
276 /* #define RTDEBUG */
277 /* #define GISTDEBUG */
278 /* #define OMIT_PARTIAL_INDEX */
279 /* #define NO_SECURITY */
280 /* #define LOCK_DEBUG */
283 * defining unsafe floats's will make float4 and float8
284 * ops faster at the cost of safety, of course!
286 /* #define UNSAFE_FLOATS */
290 *------------------------------------------------------------------------
291 * Part 3: system configuration information that is auto-detected by
292 * configure. In theory you shouldn't have to touch any of this stuff
293 * by hand. In the real world, configure might get it wrong...
294 *------------------------------------------------------------------------
297 /* Define const as empty if your compiler doesn't grok const. */
300 /* Define as your compiler's spelling of "inline", or empty if no inline. */
303 /* Define as empty if the C compiler doesn't understand "signed". */
306 /* Define as empty if the C compiler doesn't understand "volatile". */
309 /* Define if your cpp understands the ANSI stringizing operators in macros */
310 #undef HAVE_STRINGIZE
312 /* Set to 1 if you have <crypt.h> */
315 /* Set to 1 if you have <dld.h> */
318 /* Set to 1 if you have <endian.h> */
321 /* Set to 1 if you have <fp_class.h> */
322 #undef HAVE_FP_CLASS_H
324 /* Set to 1 if you have <getopt.h> */
327 /* Set to 1 if you have <history.h> */
328 #undef HAVE_HISTORY_H
330 /* Set to 1 if you have <ieeefp.h> */
333 /* Set to 1 if you have <netinet/tcp.h> */
334 #undef HAVE_NETINET_TCP_H
336 /* Set to 1 if you have <readline.h> */
337 #undef HAVE_READLINE_H
339 /* Set to 1 if you have <readline/history.h> */
340 #undef HAVE_READLINE_HISTORY_H
342 /* Set to 1 if you have <readline/readline.h> */
343 #undef HAVE_READLINE_READLINE_H
345 /* Set to 1 if you have <sys/ipc.h> */
346 #undef HAVE_SYS_IPC_H
348 /* Set to 1 if you have <sys/select.h> */
349 #undef HAVE_SYS_SELECT_H
351 /* Set to 1 if you have <sys/un.h> */
354 /* Set to 1 if you have <sys/sem.h> */
355 #undef HAVE_SYS_SEM_H
357 /* Set to 1 if you have <sys/shm.h> */
358 #undef HAVE_SYS_SHM_H
360 /* Set to 1 if you have <kernel/OS.h> */
361 #undef HAVE_KERNEL_OS_H
363 /* Set to 1 if you have <SupportDefs.h> */
364 #undef HAVE_SUPPORTDEFS_H
366 /* Set to 1 if you have <kernel/image.h> */
367 #undef HAVE_KERNEL_IMAGE_H
369 /* Set to 1 if you have <termios.h> */
370 #undef HAVE_TERMIOS_H
372 /* Set to 1 if you have <sys/pstat.h> */
373 #undef HAVE_SYS_PSTAT_H
375 /* Define if you have the setproctitle function. */
376 #undef HAVE_SETPROCTITLE
378 /* Define if you have the pstat function. */
381 /* Define if the PS_STRINGS thing exists. */
382 #undef HAVE_PS_STRINGS
384 /* Define if you have the stricmp function. */
387 /* Set to 1 if you have history functions (either in libhistory or libreadline) */
388 #undef HAVE_HISTORY_FUNCTIONS
390 /* Set to 1 if you have <pwd.h> */
393 /* Set to 1 if you gettimeofday(a,b) vs gettimeofday(a) */
394 #undef GETTIMEOFDAY_1ARG
395 #ifdef GETTIMEOFDAY_1ARG
396 # define gettimeofday(a,b) gettimeofday(a)
399 /* Set to 1 if you have snprintf() in the C library */
402 /* Set to 1 if your standard system headers declare snprintf() */
403 #undef HAVE_SNPRINTF_DECL
405 /* Set to 1 if you have vsnprintf() in the C library */
406 #undef HAVE_VSNPRINTF
408 /* Set to 1 if your standard system headers declare vsnprintf() */
409 #undef HAVE_VSNPRINTF_DECL
411 /* Set to 1 if you have strerror() */
414 /* Set to 1 if you have isinf() */
417 extern int isinf(double x);
421 * These are all related to port/isinf.c
425 #undef HAVE_FP_CLASS_H
426 #undef HAVE_FP_CLASS_D
429 /* Set to 1 if you have gethostname() */
430 #undef HAVE_GETHOSTNAME
431 #ifndef HAVE_GETHOSTNAME
432 extern int gethostname(char *name, int namelen);
435 /* Set to 1 if struct tm has a tm_zone member */
438 /* Set to 1 if you have int timezone.
439 * NOTE: if both tm_zone and a global timezone variable exist,
440 * using the tm_zone field should probably be preferred,
441 * since global variables are inherently not thread-safe.
443 #undef HAVE_INT_TIMEZONE
445 /* Set to 1 if you have cbrt() */
448 /* Set to 1 if you have inet_aton() */
449 #undef HAVE_INET_ATON
451 #ifndef HAVE_INET_ATON
452 # include <sys/types.h>
453 # include <netinet/in.h>
454 # include <arpa/inet.h>
455 extern int inet_aton(const char *cp, struct in_addr * addr);
458 /* Set to 1 if you have fcvt() */
461 /* Set to 1 if you have rint() */
464 /* Set to 1 if you have finite() */
467 /* Set to 1 if you have memmove() */
470 /* Set to 1 if you have sigsetjmp() */
471 #undef HAVE_SIGSETJMP
474 * When there is no sigsetjmp, its functionality is provided by plain
475 * setjmp. Incidentally, nothing provides setjmp's functionality in
478 #ifndef HAVE_SIGSETJMP
479 # define sigjmp_buf jmp_buf
480 # define sigsetjmp(x,y) setjmp(x)
481 # define siglongjmp longjmp
484 /* Set to 1 if you have sysconf() */
487 /* Set to 1 if you have getrusage() */
488 #undef HAVE_GETRUSAGE
490 /* Set to 1 if you have waitpid() */
493 /* Set to 1 if you have setsid() */
496 /* Set to 1 if you have sigprocmask() */
497 #undef HAVE_SIGPROCMASK
499 /* Set to 1 if you have sigprocmask() */
500 #undef HAVE_STRCASECMP
501 #ifndef HAVE_STRCASECMP
502 extern int strcasecmp(char *s1, char *s2);
505 /* Set to 1 if you have strtol() */
508 /* Set to 1 if you have strtoul() */
511 /* Set to 1 if you have strdup() */
514 extern char *strdup(char const *);
517 /* Set to 1 if you have random() */
520 extern long random(void);
523 /* Set to 1 if you have srandom() */
526 extern void srandom(unsigned int seed);
529 /* The random() function is expected to yield values 0 .. MAX_RANDOM_VALUE */
530 /* Currently, all known implementations yield 0..2^31-1, so we just hardwire
531 * this constant. We could do a configure test if it proves to be necessary.
532 * CAUTION: Think not to replace this with RAND_MAX. RAND_MAX defines the
533 * maximum value of the older rand() function, which is often different from
534 * --- and considerably inferior to --- random().
536 #define MAX_RANDOM_VALUE (0x7FFFFFFF)
538 /* Set to 1 if you have libz.a */
541 /* Set to 1 if you have libreadline.a */
542 #undef HAVE_LIBREADLINE
544 /* Set to 1 if you have libhistory.a */
545 #undef HAVE_LIBHISTORY
547 /* Set to 1 if your libreadline defines rl_completion_append_character */
548 #undef HAVE_RL_COMPLETION_APPEND_CHARACTER
550 /* Set to 1 if filename_completion_function is declared in the readline header */
551 #undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
553 /* Set to 1 if you have getopt_long() (GNU long options) */
554 #undef HAVE_GETOPT_LONG
556 /* Set to 1 if you have union semun */
557 #undef HAVE_UNION_SEMUN
559 /* Set to 1 if you have struct sockaddr_un */
560 #undef HAVE_STRUCT_SOCKADDR_UN
562 /* Set to 1 if you have F_SETLK option for fcntl() */
563 #undef HAVE_FCNTL_SETLK
565 /* Set to 1 if type "long int" works and is 64 bits */
566 #undef HAVE_LONG_INT_64
568 /* Set to 1 if type "long long int" works and is 64 bits */
569 #undef HAVE_LONG_LONG_INT_64
571 /* Define this as the appropriate snprintf format for 64-bit ints, if any */
575 * These must be defined as the alignment requirement (NOT the size) of
576 * each of the basic C data types (except char, which we assume has align 1).
577 * MAXIMUM_ALIGNOF is the largest alignment requirement for any C data type.
578 * ALIGNOF_LONG_LONG_INT need only be defined if HAVE_LONG_LONG_INT_64 is.
583 #undef ALIGNOF_LONG_LONG_INT
584 #undef ALIGNOF_DOUBLE
585 #undef MAXIMUM_ALIGNOF
587 /* Define as the type of the 3rd argument to accept() */
588 #undef ACCEPT_TYPE_ARG3
590 /* Define if POSIX signal interface is available */
591 #undef HAVE_POSIX_SIGNALS
593 /* Define if C++ compiler accepts "using namespace std" */
594 #undef HAVE_NAMESPACE_STD
596 /* Define if C++ compiler accepts "#include <string>" */
597 #undef HAVE_CXX_STRING_HEADER
599 /* Define if a system lib (-ldl) has dlopen() (needed for AIX) */
604 *------------------------------------------------------------------------
605 * Part 4: pull in system-specific declarations.
607 * This is still configure's responsibility, because it picks where
608 * the "os.h" symlink points...
609 *------------------------------------------------------------------------
613 * Pull in OS-specific declarations (using link created by configure)
619 * The following is used as the arg list for signal handlers. Any ports
620 * that take something other than an int argument should override this in
621 * the port-specific os.h file. Note that variable names are required
622 * because it is used in both the prototypes as well as the definitions.
623 * Note also the long name. We expect that this won't collide with
624 * other names causing compiler warnings.
628 #define SIGNAL_ARGS int postgres_signal_arg
632 #endif /* CONFIG_H */