Eneboo - Documentación para desarrolladores
src/libpq/include/pg_config_manual.h
Ir a la documentación de este archivo.
00001 /*------------------------------------------------------------------------
00002  * PostgreSQL manual configuration settings
00003  *
00004  * This file contains various configuration symbols and limits.  In
00005  * all cases, changing them is only useful in very rare situations or
00006  * for developers.      If you edit any of these, be sure to do a *full*
00007  * rebuild (and an initdb if noted).
00008  *
00009  * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.18 2005/10/07 20:11:03 tgl Exp $
00010  *------------------------------------------------------------------------
00011  */
00012 
00013 /*
00014  * Size of a disk block --- this also limits the size of a tuple.  You
00015  * can set it bigger if you need bigger tuples (although TOAST should
00016  * reduce the need to have large tuples, since fields can be spread
00017  * across multiple tuples).
00018  *
00019  * BLCKSZ must be a power of 2.  The maximum possible value of BLCKSZ
00020  * is currently 2^15 (32768).  This is determined by the 15-bit widths
00021  * of the lp_off and lp_len fields in ItemIdData (see
00022  * include/storage/itemid.h).
00023  *
00024  * Changing BLCKSZ requires an initdb.
00025  */
00026 #define BLCKSZ  8192
00027 
00028 /*
00029  * RELSEG_SIZE is the maximum number of blocks allowed in one disk
00030  * file.  Thus, the maximum size of a single file is RELSEG_SIZE *
00031  * BLCKSZ; relations bigger than that are divided into multiple files.
00032  *
00033  * RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
00034  * This is often 2 GB or 4GB in a 32-bit operating system, unless you
00035  * have large file support enabled.  By default, we make the limit 1
00036  * GB to avoid any possible integer-overflow problems within the OS.
00037  * A limit smaller than necessary only means we divide a large
00038  * relation into more chunks than necessary, so it seems best to err
00039  * in the direction of a small limit.  (Besides, a power-of-2 value
00040  * saves a few cycles in md.c.)
00041  *
00042  * Changing RELSEG_SIZE requires an initdb.
00043  */
00044 #define RELSEG_SIZE (0x40000000 / BLCKSZ)
00045 
00046 /*
00047  * XLOG_SEG_SIZE is the size of a single WAL file.      This must be a power of 2
00048  * and larger than BLCKSZ (preferably, a great deal larger than BLCKSZ).
00049  *
00050  * Changing XLOG_SEG_SIZE requires an initdb.
00051  */
00052 #define XLOG_SEG_SIZE   (16*1024*1024)
00053 
00054 /*
00055  * Maximum number of arguments to a function.
00056  *
00057  * The minimum value is 8 (index creation uses 8-argument functions).
00058  * The maximum possible value is around 600 (limited by index tuple size in
00059  * pg_proc's index; BLCKSZ larger than 8K would allow more).  Values larger
00060  * than needed will waste memory and processing time, but do not directly
00061  * cost disk space.
00062  *
00063  * Changing this does not require an initdb, but it does require a full
00064  * backend recompile (including any user-defined C functions).
00065  */
00066 #define FUNC_MAX_ARGS           100
00067 
00068 /*
00069  * Maximum number of columns in an index.  There is little point in making
00070  * this anything but a multiple of 32, because the main cost is associated
00071  * with index tuple header size (see access/itup.h).
00072  *
00073  * Changing this requires an initdb.
00074  */
00075 #define INDEX_MAX_KEYS          32
00076 
00077 /*
00078  * Number of spare LWLocks to allocate for user-defined add-on code.
00079  */
00080 #define NUM_USER_DEFINED_LWLOCKS        4
00081 
00082 /*
00083  * Define this to make libpgtcl's "pg_result -assign" command process
00084  * C-style backslash sequences in returned tuple data and convert
00085  * PostgreSQL array values into Tcl lists.      CAUTION: This conversion
00086  * is *wrong* unless you install the routines in
00087  * contrib/string/string_io to make the server produce C-style
00088  * backslash sequences in the first place.
00089  */
00090 /* #define TCL_ARRAYS */
00091 
00092 /*
00093  * User locks are handled totally on the application side as long term
00094  * cooperative locks which extend beyond the normal transaction
00095  * boundaries.  Their purpose is to indicate to an application that
00096  * someone is `working' on an item.  Define this flag to enable user
00097  * locks.  You will need the loadable module user-locks.c to use this
00098  * feature.
00099  */
00100 #define USER_LOCKS
00101 
00102 /*
00103  * Define this if you want psql to _always_ ask for a username and a
00104  * password for password authentication.
00105  */
00106 /* #define PSQL_ALWAYS_GET_PASSWORDS */
00107 
00108 /*
00109  * Define this if you want to allow the lo_import and lo_export SQL
00110  * functions to be executed by ordinary users.  By default these
00111  * functions are only available to the Postgres superuser.      CAUTION:
00112  * These functions are SECURITY HOLES since they can read and write
00113  * any file that the PostgreSQL server has permission to access.  If
00114  * you turn this on, don't say we didn't warn you.
00115  */
00116 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
00117 
00118 /*
00119  * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
00120  * maximum usable pathname length is one less).
00121  *
00122  * We'd use a standard system header symbol for this, if there weren't
00123  * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
00124  * defined by different "standards", and often have different values
00125  * on the same platform!  So we just punt and use a reasonably
00126  * generous setting here.
00127  */
00128 #define MAXPGPATH               1024
00129 
00130 /*
00131  * PG_SOMAXCONN: maximum accept-queue length limit passed to
00132  * listen(2).  You'd think we should use SOMAXCONN from
00133  * <sys/socket.h>, but on many systems that symbol is much smaller
00134  * than the kernel's actual limit.  In any case, this symbol need be
00135  * twiddled only if you have a kernel that refuses large limit values,
00136  * rather than silently reducing the value to what it can handle
00137  * (which is what most if not all Unixen do).
00138  */
00139 #define PG_SOMAXCONN    10000
00140 
00141 /*
00142  * You can try changing this if you have a machine with bytes of
00143  * another size, but no guarantee...
00144  */
00145 #define BITS_PER_BYTE           8
00146 
00147 /*
00148  * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
00149  * user space and kernel space are significantly faster if the user buffer
00150  * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
00151  * a platform-dependent value, but for now we just hard-wire it.
00152  */
00153 #define ALIGNOF_BUFFER  32
00154 
00155 /*
00156  * Disable UNIX sockets for those operating system.
00157  */
00158 #if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
00159 #undef HAVE_UNIX_SOCKETS
00160 #endif
00161 
00162 /*
00163  * Define this if your operating system supports link()
00164  */
00165 #if !defined(__QNX__) && !defined(__BEOS__) && \
00166         !defined(WIN32) && !defined(__CYGWIN__)
00167 #define HAVE_WORKING_LINK 1
00168 #endif
00169 
00170 /*
00171  * This is the default directory in which AF_UNIX socket files are
00172  * placed.      Caution: changing this risks breaking your existing client
00173  * applications, which are likely to continue to look in the old
00174  * directory.  But if you just hate the idea of sockets in /tmp,
00175  * here's where to twiddle it.  You can also override this at runtime
00176  * with the postmaster's -k switch.
00177  */
00178 #define DEFAULT_PGSOCKET_DIR  "/tmp"
00179 
00180 /*
00181  * The random() function is expected to yield values between 0 and
00182  * MAX_RANDOM_VALUE.  Currently, all known implementations yield
00183  * 0..2^31-1, so we just hardwire this constant.  We could do a
00184  * configure test if it proves to be necessary.  CAUTION: Think not to
00185  * replace this with RAND_MAX.  RAND_MAX defines the maximum value of
00186  * the older rand() function, which is often different from --- and
00187  * considerably inferior to --- random().
00188  */
00189 #define MAX_RANDOM_VALUE  (0x7FFFFFFF)
00190 
00191 
00192 /*
00193  *------------------------------------------------------------------------
00194  * The following symbols are for enabling debugging code, not for
00195  * controlling user-visible features or resource limits.
00196  *------------------------------------------------------------------------
00197  */
00198 
00199 /*
00200  * Define this to cause pfree()'d memory to be cleared immediately, to
00201  * facilitate catching bugs that refer to already-freed values.  XXX
00202  * Right now, this gets defined automatically if --enable-cassert.      In
00203  * the long term it probably doesn't need to be on by default.
00204  */
00205 #ifdef USE_ASSERT_CHECKING
00206 #define CLOBBER_FREED_MEMORY
00207 #endif
00208 
00209 /*
00210  * Define this to check memory allocation errors (scribbling on more
00211  * bytes than were allocated).  Right now, this gets defined
00212  * automatically if --enable-cassert.  In the long term it probably
00213  * doesn't need to be on by default.
00214  */
00215 #ifdef USE_ASSERT_CHECKING
00216 #define MEMORY_CONTEXT_CHECKING
00217 #endif
00218 
00219 /*
00220  * Define this to force all parse and plan trees to be passed through
00221  * copyObject(), to facilitate catching errors and omissions in
00222  * copyObject().
00223  */
00224 /* #define COPY_PARSE_PLAN_TREES */
00225 
00226 /*
00227  * Enable debugging print statements for lock-related operations.
00228  */
00229 /* #define LOCK_DEBUG */
00230 
00231 /*
00232  * Enable debugging print statements for WAL-related operations; see
00233  * also the wal_debug GUC var.
00234  */
00235 /* #define WAL_DEBUG */
00236 
00237 /*
00238  * Enable tracing of resource consumption during sort operations;
00239  * see also the trace_sort GUC var.  For 8.1 this is enabled by default.
00240  */
00241 #define TRACE_SORT 1
00242 
00243 /*
00244  * Other debug #defines (documentation, anyone?)
00245  */
00246 /* #define HEAPDEBUGALL */
00247 /* #define ACLDEBUG */
00248 /* #define RTDEBUG */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'