? runtime-sgml.patch ? doc/src/sgml/runtime.sgml.CRASHED Index: doc/src/sgml/client-auth.sgml =================================================================== RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/client-auth.sgml,v retrieving revision 1.50 diff -r1.50 client-auth.sgml 491c491 < described in . Or you --- > described in . Or you Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v retrieving revision 1.186 diff -r1.186 runtime.sgml 584a585,587 > > > Connections and Authentication 586,587c589,590 < < Planner and Optimizer Tuning --- > > Connection Settings 589c592,593 < --- > > 591c595 < CPU_INDEX_TUPLE_COST (floating point) --- > TCPIP_SOCKET (boolean) 594,596c598,601 < Sets the query planner's estimate of the cost of processing < each index tuple during an index scan. This is measured as a < fraction of the cost of a sequential page fetch. --- > If this is true, then the server will accept TCP/IP connections. > Otherwise only local Unix domain socket connections are > accepted. It is off by default. This option can only be set at > server start. 600c605 < --- > 602c607 < CPU_OPERATOR_COST (floating point) --- > MAX_CONNECTIONS (integer) 605,607c610,613 < Sets the planner's estimate of the cost of processing each < operator in a WHERE clause. This is measured as a fraction of < the cost of a sequential page fetch. --- > Determines the maximum number of concurrent connections to the > database server. The default is 32 (unless altered while > building the server). This parameter can only be set at server > start. 611c617 < --- > 613c619,620 < CPU_TUPLE_COST (floating point) --- > SUPERUSER_RESERVED_CONNECTIONS > (integer) 616,618c623,635 < Sets the query planner's estimate of the cost of processing < each tuple during a query. This is measured as a fraction of < the cost of a sequential page fetch. --- > Determines the number of connection slots that > are reserved for connections by PostgreSQL > superusers. At most max_connections connections can > ever be active simultaneously. Whenever the number of active > concurrent connections is at least max_connections minus > superuser_reserved_connections, new connections > will be accepted only for superusers. > > > > The default value is 2. The value must be less than the value of > max_connections. This parameter can only be > set at server start. 622c639 < --- > 624c641,642 < DEFAULT_STATISTICS_TARGET (integer) --- > PORT (integer) > port 627,631c645,646 < Sets the default statistics target for table columns that have not < had a column-specific target set via ALTER TABLE SET < STATISTICS. Larger values increase the time needed to do < ANALYZE, but may improve the quality of the planner's < estimates. The default value is 10. --- > The TCP port the server listens on; 5432 by default. This > option can only be set at server start. 635c650,651 < --- > > 637c653 < EFFECTIVE_CACHE_SIZE (floating point) --- > UNIX_SOCKET_DIRECTORY (string) 640,644c656,659 < Sets the planner's assumption about the effective size of the < disk cache (that is, the portion of the kernel's disk cache that < will be used for PostgreSQL data < files). This is measured in disk pages, which are normally 8 kB < each. --- > Specifies the directory of the Unix-domain socket on which the > server is to listen for > connections from client applications. The default is normally > /tmp, but can be changed at build time. 650c665 < ENABLE_HASHAGG (boolean) --- > UNIX_SOCKET_GROUP (string) 653,655c668,675 < Enables or disables the query planner's use of hashed aggregation < plan types. The default is on. This is used for debugging the query < planner. --- > Sets the group owner of the Unix domain socket. (The owning > user of the socket is always the user that starts the > server.) In combination with the option > UNIX_SOCKET_PERMISSIONS this can be used as > an additional access control mechanism for this socket type. > By default this is the empty string, which uses the default > group for the current user. This option can only be set at > server start. 661c681 < ENABLE_HASHJOIN (boolean) --- > UNIX_SOCKET_PERMISSIONS (integer) 664,666c684,690 < Enables or disables the query planner's use of hash-join plan < types. The default is on. This is used for debugging the < query planner. --- > Sets the access permissions of the Unix domain socket. Unix > domain sockets use the usual Unix file system permission set. > The option value is expected to be an numeric mode > specification in the form accepted by the > chmod and umask > system calls. (To use the customary octal format the number > must start with a 0 (zero).) 668,669d691 < < 671,674c693,701 < < < index scan < --- > > The default permissions are 0777, meaning > anyone can connect. Reasonable alternatives are > 0770 (only user and group, see also under > UNIX_SOCKET_GROUP) and 0700 > (only user). (Note that actually for a Unix domain socket, only write > permission matters and there is no point in setting or revoking > read or execute permissions.) > 676,677d702 < ENABLE_INDEXSCAN (boolean) < 679,681c704,705 < Enables or disables the query planner's use of index-scan plan < types. The default is on. This is used to debugging the < query planner. --- > This access control mechanism is independent of the one > described in . 683,684d706 < < 686,688d707 < < ENABLE_MERGEJOIN (boolean) < 690,692c709 < Enables or disables the query planner's use of merge-join plan < types. The default is on. This is used for debugging the < query planner. --- > This option can only be set at server start. 696c713,719 < --- > > > > > Security and Authentication > > 698c721,722 < ENABLE_NESTLOOP (boolean) --- > AUTHENTICATION_TIMEOUT (integer) > timeoutauthentication 701,705c725,730 < Enables or disables the query planner's use of nested-loop join < plans. It's not possible to suppress nested-loop joins entirely, < but turning this variable off discourages the planner from using < one if there are other methods available. The default is < on. This is used for debugging the query planner. --- > Maximum time to complete client authentication, in seconds. If a > would-be client has not completed the authentication protocol in > this much time, the server breaks the connection. This prevents > hung clients from occupying a connection indefinitely. This > option can only be set at server start or in the > postgresql.conf file. 709c734 < --- > 712c737 < sequential scan --- > SSL 715c740 < ENABLE_SEQSCAN (boolean) --- > SSL (boolean) 718,722c743,745 < Enables or disables the query planner's use of sequential scan < plan types. It's not possible to suppress sequential scans < entirely, but turning this variable off discourages the planner < from using one if there are other methods available. The < default is on. This is used for debugging the query planner. --- > Enables SSL connections. Please read > before using this. The default > is off. 728c751 < ENABLE_SORT (boolean) --- > KRB_SERVER_KEYFILE (string) 731,735c754,755 < Enables or disables the query planner's use of explicit sort < steps. It's not possible to suppress explicit sorts entirely, < but turning this variable off discourages the planner from < using one if there are other methods available. The default < is on. This is used for debugging the query planner. --- > Sets the location of the Kerberos server key file. See > for details. 741c761 < ENABLE_TIDSCAN (boolean) --- > VIRTUAL_HOST (string) 744,746c764,767 < Enables or disables the query planner's use of TID scan plan < types. The default is on. This is used for debugging the < query planner. --- > Specifies the host name or IP address on which the server is > to listen for connections from client applications. The > default is to listening on all configured addresses (including > localhost). 752c773 < FROM_COLLAPSE_LIMIT (integer) --- > DB_USER_NAMESPACE (boolean) 755,759c776,786 < The planner will merge sub-queries into upper queries if the resulting < FROM list would have no more than this many items. Smaller values < reduce planning time but may yield inferior query plans. < The default is 8. It is usually wise to keep this less than < GEQO_THRESHOLD. --- > This allows per-database user names. It is off by default. > > > > If this is on, you should create users as username@dbname. > When username is passed by a connecting client, > @ and the database name is appended to the user > name and that database-specific user name is looked up by the > server. Note that when you create users with names containing > @ within the SQL environment, you will need to > quote the user name. 760a788,802 > > > With this option enabled, you can still create ordinary global > users. Simply append @ when specifying the user > name in the client. The @ will be stripped off > before the user name is looked up by the server. > > > > > This feature is intended as a temporary measure until a > complete solution is found. At that time, this option will > be removed. > > 764,771c806,808 < < < genetic query optimization < < < GEQO < genetic query optimization < --- > > > 773c810,818 < GEQO (boolean) --- > > Resource Usage (Except WAL) > > > Memory > > > > SHARED_BUFFERS (integer) 776,779c821,836 < Enables or disables genetic query optimization, which is an < algorithm that attempts to do query planning without exhaustive < searching. This is on by default. See also the various other < GEQO_ settings. --- > Sets the number of shared memory buffers used by the database > server. The default is 64. Each buffer is typically 8192 > bytes. This must be greater than 16, as well as at least twice > the value of MAX_CONNECTIONS; however, a > higher value can often improve performance. > Values of a few thousand are recommended > for production installations. This option can only be set at > server start. > > > > Increasing this parameter may cause PostgreSQL > to request more System V shared > memory than your operating system's default configuration > allows. See for information on how to > adjust these parameters, if necessary. 785,789c842 < GEQO_EFFORT (integer) < GEQO_GENERATIONS (integer) < GEQO_POOL_SIZE (integer) < GEQO_RANDOM_SEED (integer) < GEQO_SELECTION_BIAS (floating point) --- > SORT_MEM (integer) 792,807c845,869 < Various tuning parameters for the genetic query optimization < algorithm: The pool size is the number of individuals in one < population. Valid values are between 128 and 1024. If it is set < to 0 (the default) a pool size of 2^(QS+1), where QS is the < number of FROM items in the query, is taken. The effort is used < to calculate a default for generations. Valid values are between < 1 and 80, 40 being the default. Generations specifies the number < of iterations in the algorithm. The number must be a positive < integer. If 0 is specified then Effort * < Log2(PoolSize) is used. The run time of the algorithm < is roughly proportional to the sum of pool size and generations. < The selection bias is the selective pressure within the < population. Values can be from 1.50 to 2.00; the latter is the < default. The random seed can be set to get reproducible results < from the algorithm. If it is set to -1 then the algorithm < behaves non-deterministically. --- > Specifies the amount of memory to be used by internal sort operations and > hash tables before switching to temporary disk files. The value is > specified in kilobytes, and defaults to 1024 kilobytes (1 MB). > Note that for a complex query, several sort or hash operations might be > running in parallel; each one will be allowed to use as much memory > as this value specifies before it starts to put data into temporary > files. Also, several running sessions could be doing > sort operations simultaneously. So the total memory used could be many > times the value of SORT_MEM. Sort operations are used > by ORDER BY, merge joins, and CREATE INDEX. > Hash tables are used in hash joins, hash-based aggregation, and > hash-based processing of IN subqueries. > > > > > > VACUUM_MEM (integer) > > > Specifies the maximum amount of memory to be used by > VACUUM to keep track of to-be-reclaimed > tuples. The value is specified in kilobytes, and defaults to > 8192 kilobytes. Larger settings may improve the speed of > vacuuming large tables that have many deleted tuples. 811a874,879 > > > > Free Space Map > > 813c881 < GEQO_THRESHOLD (integer) --- > MAX_FSM_PAGES (integer) 816,821c884,888 < Use genetic query optimization to plan queries with at least < this many FROM items involved. (Note that an outer < JOIN construct counts as only one FROM < item.) The default is 11. For simpler queries it is usually best < to use the deterministic, exhaustive planner, but for queries with < many tables the deterministic planner takes too long. --- > Sets the maximum number of disk pages for which free space will > be tracked in the shared free-space map. Six bytes of shared memory > are consumed for each page slot. This setting must be more than > 16 * max_fsm_relations. The default is 20000. > This option can only be set at server start. 827c894 < JOIN_COLLAPSE_LIMIT (integer) --- > MAX_FSM_RELATIONS (integer) 830,837c897,901 < The planner will flatten explicit inner JOIN constructs < into lists of FROM items whenever a list of no more than < this many items would result. Usually this is set the same as < FROM_COLLAPSE_LIMIT. Setting it to 1 prevents any < flattening of inner JOINs, allowing explicit < JOIN syntax to be used to control the join order. < Intermediate values might be useful to trade off planning time < against quality of plan. --- > Sets the maximum number of relations (tables and indexes) for which > free space will be tracked in the shared free-space map. Roughly > fifty bytes of shared memory are consumed for each slot. > The default is 1000. > This option can only be set at server start. 840a905,910 > > > > > Disk Resource Usage > 843c913 < RANDOM_PAGE_COST (floating point) --- > MAX_FILES_PER_PROCESS (integer) 846,850c916,929 < Sets the query planner's estimate of the cost of a < nonsequentially fetched disk page. This is measured as a < multiple of the cost of a sequential page fetch. A higher < value makes it more likely a sequential scan will be used, < a lower value makes it more likely an index scan will be used. --- > Sets the maximum number of simultaneously open files allowed to each > server subprocess. The default is 1000. The limit actually used > by the code is the smaller of this setting and the result of > sysconf(_SC_OPEN_MAX). Therefore, on systems > where sysconf returns a reasonable limit, you don't > need to worry about this setting. But on some platforms > (notably, most BSD systems), sysconf returns a > value that is much larger than the system can really support > when a large number of processes all try to open that many > files. If you find yourself seeing Too many open files > failures, try reducing this setting. This option can only be set > at server start or in the postgresql.conf > configuration file; if changed in the configuration file, it > only affects subsequently-started server subprocesses. 854c933,948 < --- > > > PRELOAD_LIBRARIES (string) > preload_libraries > > > This variable specifies one or more shared libraries that are > to be preloaded at server start. An initialization function > can also be optionally specified by adding a colon followed by > the name of the initialization function after the library > name. For example > '$libdir/mylib:init_mylib' would cause > mylib to be preloaded and init_mylib > to be executed. If more than one library is to be loaded, they > must be delimited with a comma. > 856,863c950,963 < < < Unfortunately, there is no well-defined method for determining < ideal values for the family of cost variables that < were just described. You are encouraged to experiment and share < your findings. < < --- > > If mylib is not found, the server will fail to > start. However, if init_mylib is not found, > mylib will still be preloaded without executing > the initialization function. > > > > By preloading a shared library (and initializing it if > applicable), the library startup time is avoided when the > library is first used. > > > 864a965,966 > > 867,868c969,970 < < Logging and Debugging --- > > Write Ahead Logging 870c972,980 < --- > > See also for details on WAL > tuning. > > > > Settings > > 872c982,986 < CLIENT_MIN_MESSAGES (string) --- > > fsync > > > FSYNC (boolean) 875,883c989,995 < This controls which message levels are send to the client. < client. Valid values are DEBUG5, < DEBUG4, DEBUG3, DEBUG2, < DEBUG1, LOG, NOTICE, < WARNING, and ERROR. Each level < includes all the levels that follow it. The later the level, < the fewer messages are sent. The default is < NOTICE. Note that LOG has a different < rank here than in LOG_MIN_MESSAGES. --- > If this option is on, the PostgreSQL server > will use the fsync() system call in several places > to make sure that updates are physically written to disk. This > insures that a database cluster will recover to a > consistent state after an operating system or hardware crash. > (Crashes of the database server itself are not > related to this.) 887,896c999,1008 < Here is a list of the various message types: < < < DEBUG[1-5] < < < Provides information for use by developers. < < < --- > However, this operation does slow down > PostgreSQL because at transaction commit it has > wait for the operating system to flush the write-ahead log. > Without fsync, the operating system is allowed to > do its best in buffering, sorting, and delaying writes, which > can considerably increase performance. However, if the system > crashes, the results of the last few committed transactions may > be lost in part or whole. In the worst case, unrecoverable data > corruption may occur. > 898,906c1010,1020 < < INFO < < < Provides information implicitly requested by the user, < e.g., during VACUUM VERBOSE. < < < --- > > For the above reasons, everyone can decide for himself what to > do with the fsync option. Some administrators > always leave it off, some turn it off only for bulk loads, > where there is a clear restart point if something goes wrong, > and some leave it on just to be on the safe side. The default > is on so that you are on the safe side. If you trust your > operating system, your hardware, and your utility company (or > better your battery backup), you can consider disabling > fsync. > 908,917c1022,1122 < < NOTICE < < < Provides information that may be helpful to users, e.g., < truncation of long identifiers and the creation of indexes as part < of primary keys. < < < --- > > It should be noted that the performance penalty of having > fsync on is considerably less in > PostgreSQL version 7.1 and later. If you > previously suppressed fsync for performance > reasons, you may wish to reconsider your choice. > > > > This option can only be set at server start or in the > postgresql.conf file. > > > > > > WAL_SYNC_METHOD (string) > > > Method used for forcing WAL updates out to disk. Possible > values are > FSYNC (call fsync() at each commit), > FDATASYNC (call fdatasync() at each commit), > OPEN_SYNC (write WAL files with open() option O_SYNC), and > OPEN_DATASYNC (write WAL files with open() option O_DSYNC). > Not all of these choices are available on all platforms. > This option can only be set at server start or in the > postgresql.conf file. > > > > > > WAL_BUFFERS (integer) > > > Number of disk-page buffers in shared memory for WAL > logging. The default is 4. This option can only be set at > server start. > > > > > > > > Checkpoints > > > > CHECKPOINT_SEGMENTS (integer) > > > Maximum distance between automatic WAL checkpoints, in log file > segments (each segment is normally 16 megabytes). > This option can only be set at server start or in the > postgresql.conf file. > > > > > > CHECKPOINT_TIMEOUT (integer) > > > Maximum time between automatic WAL checkpoints, in seconds. > This option can only be set at server start or in the > postgresql.conf file. > > > > > > CHECKPOINT_WARNING (integer) > > > Send a message to the server logs if checkpoints caused by the > filling of checkpoint segment files happens more frequently than > this number of seconds. Zero turns off the warning. > > > > > > > COMMIT_DELAY (integer) > > > Time delay between writing a commit record to the WAL buffer and > flushing the buffer out to disk, in microseconds. A nonzero > delay allows multiple transactions to be committed with only one > fsync system call, if system load is high > enough additional transactions may become ready to commit within > the given interval. But the delay is just wasted if no other > transactions become ready to commit. Therefore, the delay is > only performed if at least COMMIT_SIBLINGS other transactions > are active at the instant that a server process has written its commit > record. > > > 919,927c1124,1138 < < WARNING < < < Provides warnings to the user, e.g., COMMIT < outside a transaction block. < < < --- > > COMMIT_SIBLINGS (integer) > > > Minimum number of concurrent open transactions to require before > performing the COMMIT_DELAY delay. A larger value > makes it more probable that at least one other transaction will > become ready to commit during the delay interval. > > > > > > > 929,936c1140,1141 < < ERROR < < < Reports an error that caused the current transaction to abort. < < < --- > > Query Tuning 938,946c1143,1145 < < LOG < < < Reports information of interest to administrators, e.g., < checkpoint activity. < < < --- > > Planner Method Enabling > 948,955d1146 < < FATAL < < < Reports an error that caused the current session to abort. < < < 957,965c1148,1154 < < PANIC < < < Reports an error that caused all sessions to abort. < < < < --- > > ENABLE_HASHAGG (boolean) > > > Enables or disables the query planner's use of hashed aggregation > plan types. The default is on. This is used for debugging the query > planner. 971c1160 < DEBUG_ASSERTIONS (boolean) --- > ENABLE_HASHJOIN (boolean) 974,983c1163,1165 < Turns on various assertion checks. This is a debugging aid. If < you are experiencing strange problems or crashes you might want < to turn this on, as it might expose programming mistakes. To use < this option, the macro USE_ASSERT_CHECKING < must be defined when PostgreSQL is < built (accomplished by the configure option < ). Note that < DEBUG_ASSERTIONS defaults to on if < PostgreSQL has been built with < assertions enabled. --- > Enables or disables the query planner's use of hash-join plan > types. The default is on. This is used for debugging the > query planner. 989,992c1171,1175 < DEBUG_PRINT_PARSE (boolean) < DEBUG_PRINT_REWRITTEN (boolean) < DEBUG_PRINT_PLAN (boolean) < DEBUG_PRETTY_PRINT (boolean) --- > > index scan > > > ENABLE_INDEXSCAN (boolean) 995,1002c1178,1180 < These options enable various debugging output to be sent to the < client or server log. For each executed query, they print the resulting < parse tree, the query rewriter output, or the execution plan. < indents these displays to < produce a more readable but much longer output format. < or < must be DEBUG1 or lower to send output to the client < or server logs. --- > Enables or disables the query planner's use of index-scan plan > types. The default is on. This is used to debugging the > query planner. 1008c1186 < EXPLAIN_PRETTY_PRINT (boolean) --- > ENABLE_MERGEJOIN (boolean) 1011,1012c1189,1191 < Determines whether EXPLAIN VERBOSE uses the indented < or non-indented format for displaying detailed query-tree dumps. --- > Enables or disables the query planner's use of merge-join plan > types. The default is on. This is used for debugging the > query planner. 1018c1197 < LOG_HOSTNAME (boolean) --- > ENABLE_NESTLOOP (boolean) 1021,1025c1200,1204 < By default, connection logs only show the IP address of the < connecting host. If you want it to show the host name you can < turn this on, but depending on your host name resolution setup < it might impose a non-negligible performance penalty. This < option can only be set at server start. --- > Enables or disables the query planner's use of nested-loop join > plans. It's not possible to suppress nested-loop joins entirely, > but turning this variable off discourages the planner from using > one if there are other methods available. The default is > on. This is used for debugging the query planner. 1031c1210,1214 < LOG_CONNECTIONS (boolean) --- > > sequential scan > > > ENABLE_SEQSCAN (boolean) 1034,1037c1217,1221 < This outputs a line to the server logs detailing each successful < connection. This is off by default, although it is probably very < useful. This option can only be set at server start or in the < postgresql.conf configuration file. --- > Enables or disables the query planner's use of sequential scan > plan types. It's not possible to suppress sequential scans > entirely, but turning this variable off discourages the planner > from using one if there are other methods available. The > default is on. This is used for debugging the query planner. 1043c1227 < LOG_DURATION (boolean) --- > ENABLE_SORT (boolean) 1046,1049c1230,1234 < Causes the duration of every completed statement to be logged. < To use this option, enable LOG_STATEMENT and < LOG_PID so you can link the statement to the < duration using the process ID. --- > Enables or disables the query planner's use of explicit sort > steps. It's not possible to suppress explicit sorts entirely, > but turning this variable off discourages the planner from > using one if there are other methods available. The default > is on. This is used for debugging the query planner. 1055c1240 < LOG_MIN_DURATION_STATEMENT (integer) --- > ENABLE_TIDSCAN (boolean) 1058,1066c1243,1245 < Sets a minimum statement execution time (in milliseconds) < above which a statement will be logged. All SQL statements < that run longer than the time specified will be logged together < with the duration, in seconds. The default is 0 < (turning this feature off). For example, if you set it < to 250 then all SQL statements that run longer < than 250ms will be logged along with the duration. Enabling this < option can be useful in tracking down unoptimized queries in < your applications. --- > Enables or disables the query planner's use of TID scan plan > types. The default is on. This is used for debugging the > query planner. 1069a1249,1262 > > > > > Planner Cost Constants > > > > Unfortunately, there is no well-defined method for determining > ideal values for the family of cost variables that > below. You are encouraged to experiment and share > your findings. > > 1070a1264,1265 > > 1072c1267 < LOG_MIN_ERROR_STATEMENT (string) --- > EFFECTIVE_CACHE_SIZE (floating point) 1075,1089c1270,1274 < Controls whether or not the SQL statement that causes an error < condition will also be recorded in the server log. All SQL < statements that cause an error of the specified level, or a < higher level, are logged. The default is < PANIC (effectively turning this feature < off). Valid values are DEBUG5, < DEBUG4, DEBUG3, < DEBUG2, DEBUG1, < INFO, NOTICE, < WARNING, ERROR, < FATAL, and PANIC. For < example, if you set this to ERROR then all < SQL statements causing errors, fatal errors, or panics will be < logged. Enabling this option can be helpful in tracking down < the source of any errors that appear in the server log. --- > Sets the planner's assumption about the effective size of the > disk cache (that is, the portion of the kernel's disk cache that > will be used for PostgreSQL data > files). This is measured in disk pages, which are normally 8 kB > each. 1090a1276,1277 > > 1091a1279,1281 > > RANDOM_PAGE_COST (floating point) > 1093,1095c1283,1287 < It is recommended you enable LOG_PID as well < so you can more easily match the error statement with the error < message. --- > Sets the query planner's estimate of the cost of a > nonsequentially fetched disk page. This is measured as a > multiple of the cost of a sequential page fetch. A higher > value makes it more likely a sequential scan will be used, > a lower value makes it more likely an index scan will be used. 1098a1291 > 1099a1293 > 1101c1295 < LOG_MIN_MESSAGES (string) --- > CPU_INDEX_TUPLE_COST (floating point) 1104,1114c1298,1300 < This controls which message levels are written to the server < log. Valid values are DEBUG5, DEBUG4, < DEBUG3, DEBUG2, DEBUG1, < INFO, NOTICE, WARNING, < ERROR, LOG, FATAL, and < PANIC. Each level includes all the levels that < follow it. The later the level, the fewer messages are sent < to the log. The default is NOTICE. Note that < LOG has a different rank here than in < CLIENT_MIN_MESSAGES. Also see that section for an < explanation of the various values. --- > Sets the query planner's estimate of the cost of processing > each index tuple during an index scan. This is measured as a > fraction of the cost of a sequential page fetch. 1116d1301 < 1119c1304 < --- > 1121c1306 < LOG_PID (boolean) --- > CPU_OPERATOR_COST (floating point) 1124,1128c1309,1311 < Prefixes each message in the server log file with the process ID of < the server process. This is useful to sort out which messages < pertain to which connection. The default is off. This parameter < does not affect messages logged via syslog, which always contain < the process ID. --- > Sets the planner's estimate of the cost of processing each > operator in a WHERE clause. This is measured as a fraction of > the cost of a sequential page fetch. 1134c1317 < LOG_STATEMENT (boolean) --- > CPU_TUPLE_COST (floating point) 1137c1320,1322 < Causes each SQL statement to be logged. --- > Sets the query planner's estimate of the cost of processing > each tuple during a query. This is measured as a fraction of > the cost of a sequential page fetch. 1141a1327,1333 > > > > Genetic Estimate Query Optimizer > > > 1143c1335,1342 < LOG_TIMESTAMP (boolean) --- > > genetic query optimization > > > GEQO > genetic query optimization > > GEQO (boolean) 1146,1147c1345,1348 < Prefixes each server log message with a time stamp. The default < is off. --- > Enables or disables genetic query optimization, which is an > algorithm that attempts to do query planning without exhaustive > searching. This is on by default. See also the various other > GEQO_ settings. 1153,1156c1354 < LOG_STATEMENT_STATS (boolean) < LOG_PARSER_STATS (boolean) < LOG_PLANNER_STATS (boolean) < LOG_EXECUTOR_STATS (boolean) --- > GEQO_THRESHOLD (integer) 1159,1161c1357,1362 < For each query, write performance statistics of the respective < module to the server log. This is a crude profiling < instrument. --- > Use genetic query optimization to plan queries with at least > this many FROM items involved. (Note that an outer > JOIN construct counts as only one FROM > item.) The default is 11. For simpler queries it is usually best > to use the deterministic, exhaustive planner, but for queries with > many tables the deterministic planner takes too long. 1167c1368,1372 < LOG_SOURCE_PORT (boolean) --- > GEQO_EFFORT (integer) > GEQO_GENERATIONS (integer) > GEQO_POOL_SIZE (integer) > GEQO_RANDOM_SEED (integer) > GEQO_SELECTION_BIAS (floating point) 1170,1174c1375,1390 < Shows the outgoing port number of the connecting host in the < connection log messages. You could trace back the port number < to find out what user initiated the connection. Other than < that, it's pretty useless and therefore off by default. This < option can only be set at server start. --- > Various tuning parameters for the genetic query optimization > algorithm: The pool size is the number of individuals in one > population. Valid values are between 128 and 1024. If it is set > to 0 (the default) a pool size of 2^(QS+1), where QS is the > number of FROM items in the query, is taken. The effort is used > to calculate a default for generations. Valid values are between > 1 and 80, 40 being the default. Generations specifies the number > of iterations in the algorithm. The number must be a positive > integer. If 0 is specified then Effort * > Log2(PoolSize) is used. The run time of the algorithm > is roughly proportional to the sum of pool size and generations. > The selection bias is the selective pressure within the > population. Values can be from 1.50 to 2.00; the latter is the > default. The random seed can be set to get reproducible results > from the algorithm. If it is set to -1 then the algorithm > behaves non-deterministically. 1177a1394,1400 > > > > > Other Query Modifiers > > 1180c1403 < STATS_COMMAND_STRING (boolean) --- > EXPLAIN_PRETTY_PRINT (boolean) 1183,1191c1406,1407 < Enables the collection of statistics on the currently < executing command of each session, along with the time at < which that command began execution. This option is off by < default. Note that even when enabled, this information is not < visible to all users, only to superusers and the user owning < the session being reported on; so it should not represent a < security risk. This data can be accessed via the < pg_stat_activity system view; refer < to for more information. --- > Determines whether EXPLAIN VERBOSE uses the indented > or non-indented format for displaying detailed query-tree dumps. 1195c1411 < --- > 1197,1198c1413 < STATS_BLOCK_LEVEL (boolean) < STATS_ROW_LEVEL (boolean) --- > FROM_COLLAPSE_LIMIT (integer) 1201,1206c1416,1420 < These enable the collection of block-level and row-level statistics < on database activity, respectively. These options are off by < default. This data can be accessed via the < pg_stat and < pg_statio family of system views; < refer to for more information. --- > The planner will merge sub-queries into upper queries if the resulting > FROM list would have no more than this many items. Smaller values > reduce planning time but may yield inferior query plans. > The default is 8. It is usually wise to keep this less than > GEQO_THRESHOLD. 1212c1426 < STATS_RESET_ON_SERVER_START (boolean) --- > JOIN_COLLAPSE_LIMIT (integer) 1215,1218c1429,1436 < If on, collected statistics are zeroed out whenever the server < is restarted. If off, statistics are accumulated across server < restarts. The default is on. This option can only be set at < server start. --- > The planner will flatten explicit inner JOIN constructs > into lists of FROM items whenever a list of no more than > this many items would result. Usually this is set the same as > FROM_COLLAPSE_LIMIT. Setting it to 1 prevents any > flattening of inner JOINs, allowing explicit > JOIN syntax to be used to control the join order. > Intermediate values might be useful to trade off planning time > against quality of plan. 1224c1442 < STATS_START_COLLECTOR (boolean) --- > MAX_EXPR_DEPTH (integer) 1227,1231c1445,1448 < Controls whether the server should start the < statistics-collection subprocess. This is on by default, but < may be turned off if you know you have no interest in < collecting statistics. This option can only be set at server < start. --- > Sets the maximum expression nesting depth of the parser. The > default value is high enough for any normal query, but you can > raise it if needed. (But if you raise it too high, you run > the risk of server crashes due to stack overflow.) 1234a1452,1462 > > > > > > > Logging and Debugging > > > Syslog > 1280a1509,1597 > > > > > When To Log > > > Here is a list of the various message types: > > > DEBUG[1-5] > > > Provides information for use by developers. > > > > > > INFO > > > Provides information implicitly requested by the user, > e.g., during VACUUM VERBOSE. > > > > > > NOTICE > > > Provides information that may be helpful to users, e.g., > truncation of long identifiers and the creation of indexes as part > of primary keys. > > > > > > WARNING > > > Provides warnings to the user, e.g., COMMIT > outside a transaction block. > > > > > > ERROR > > > Reports an error that caused the current transaction to abort. > > > > > > LOG > > > Reports information of interest to administrators, e.g., > checkpoint activity. > > > > > > FATAL > > > Reports an error that caused the current session to abort. > > > > > > PANIC > > > Reports an error that caused all sessions to abort. > > > > > > > 1283c1600 < TRACE_NOTIFY (boolean) --- > LOG_MIN_MESSAGES (string) 1286,1291c1603,1613 < Generates a great amount of debugging output for the < LISTEN and NOTIFY < commands. < or < must be DEBUG1 or lower to send output to the client < or server logs. --- > This controls which message levels are written to the server > log. Valid values are DEBUG5, DEBUG4, > DEBUG3, DEBUG2, DEBUG1, > INFO, NOTICE, WARNING, > ERROR, LOG, FATAL, and > PANIC. Each level includes all the levels that > follow it. The later the level, the fewer messages are sent > to the log. The default is NOTICE. Note that > LOG has a different rank here than in > CLIENT_MIN_MESSAGES. Also see that section for an > explanation of the various values. 1292a1615 > 1295,1299d1617 < < < < < General Operation 1301d1618 < 1303c1620 < ADD_MISSING_FROM (boolean) --- > CLIENT_MIN_MESSAGES (string) 1306,1313c1623,1631 < This parameter controls whether a relation referenced in a query but < missing from the FROM clause should be automatically added to < the FROM clause. If enabled (the default), the notice < Adding missing FROM-clause entry for table "tablename" < is generated if a relation is automatically added. If not enabled, < an error is raised when an additional extra relation is required. < For SQL standards compliance, this value should be set to < false. --- > This controls which message levels are send to the client. > client. Valid values are DEBUG5, > DEBUG4, DEBUG3, DEBUG2, > DEBUG1, LOG, NOTICE, > WARNING, and ERROR. Each level > includes all the levels that follow it. The later the level, > the fewer messages are sent. The default is > NOTICE. Note that LOG has a different > rank here than in LOG_MIN_MESSAGES. 1316a1635 > 1319,1320c1638 < AUSTRALIAN_TIMEZONES (boolean) < Australian time zones --- > LOG_MIN_ERROR_STATEMENT (string) 1323,1327c1641,1661 < If set to true, ACST, < CST, EST, and < SAT are interpreted as Australian time < zones rather than as North/South American time zones and < Saturday. The default is false. --- > Controls whether or not the SQL statement that causes an error > condition will also be recorded in the server log. All SQL > statements that cause an error of the specified level, or a > higher level, are logged. The default is > PANIC (effectively turning this feature > off). Valid values are DEBUG5, > DEBUG4, DEBUG3, > DEBUG2, DEBUG1, > INFO, NOTICE, > WARNING, ERROR, > FATAL, and PANIC. For > example, if you set this to ERROR then all > SQL statements causing errors, fatal errors, or panics will be > logged. Enabling this option can be helpful in tracking down > the source of any errors that appear in the server log. > > > > It is recommended you enable LOG_PID as well > so you can more easily match the error statement with the error > message. 1333,1334c1667 < AUTHENTICATION_TIMEOUT (integer) < timeoutauthentication --- > SILENT_MODE (boolean) 1337,1342c1670,1676 < Maximum time to complete client authentication, in seconds. If a < would-be client has not completed the authentication protocol in < this much time, the server breaks the connection. This prevents < hung clients from occupying a connection indefinitely. This < option can only be set at server start or in the < postgresql.conf file. --- > Runs the server silently. If this option is set, the server > will automatically run in background and any controlling terminals > are disassociated. Thus, no messages are written to standard > output or standard error (same effect as postmaster's > option). Unless some logging system such as > syslog is enabled, using this option is > discouraged since it makes it impossible to see error messages. 1346a1681,1687 > > > > What To Log > > > 1348,1349c1689,1692 < CLIENT_ENCODING (string) < character set encoding --- > DEBUG_PRINT_PARSE (boolean) > DEBUG_PRINT_REWRITTEN (boolean) > DEBUG_PRINT_PLAN (boolean) > DEBUG_PRETTY_PRINT (boolean) 1352,1353c1695,1702 < Sets the client-side encoding (character set). < The default is to use the database encoding. --- > These options enable various debugging output to be sent to the > client or server log. For each executed query, they print the resulting > parse tree, the query rewriter output, or the execution plan. > indents these displays to > produce a more readable but much longer output format. > or > must be DEBUG1 or lower to send output to the client > or server logs. 1359,1360c1708 < DATESTYLE (string) < date style --- > LOG_CONNECTIONS (boolean) 1363,1366c1711,1714 < Sets the display format for date and time values, as well as < the rules for interpreting ambiguous date input values. See < for more information. The < default is ISO, US. --- > This outputs a line to the server logs detailing each successful > connection. This is off by default, although it is probably very > useful. This option can only be set at server start or in the > postgresql.conf configuration file. 1370a1719 > 1372c1721 < DB_USER_NAMESPACE (boolean) --- > LOG_DURATION (boolean) 1375,1392c1724,1727 < This allows per-database user names. It is off by default. < < < < If this is on, you should create users as username@dbname. < When username is passed by a connecting client, < @ and the database name is appended to the user < name and that database-specific user name is looked up by the < server. Note that when you create users with names containing < @ within the SQL environment, you will need to < quote the user name. < < < < With this option enabled, you can still create ordinary global < users. Simply append @ when specifying the user < name in the client. The @ will be stripped off < before the user name is looked up by the server. --- > Causes the duration of every completed statement to be logged. > To use this option, enable LOG_STATEMENT and > LOG_PID so you can link the statement to the > duration using the process ID. 1394,1401d1728 < < < < This feature is intended as a temporary measure until a < complete solution is found. At that time, this option will < be removed. < < 1404c1731 < --- > 1406,1415c1733 < < deadlock < timeout < < < timeout < deadlock < < < DEADLOCK_TIMEOUT (integer) --- > LOG_PID (boolean) 1418,1431c1736,1740 < This is the amount of time, in milliseconds, to wait on a lock < before checking to see if there is a deadlock condition. The < check for deadlock is relatively slow, so the server doesn't run < it every time it waits for a lock. We (optimistically?) assume < that deadlocks are not common in production applications and < just wait on the lock for a while before starting the check for a < deadlock. Increasing this value reduces the amount of time < wasted in needless deadlock checks, but slows down reporting of < real deadlock errors. The default is 1000 (i.e., one second), < which is probably about the smallest value you would want in < practice. On a heavily loaded server you might want to raise it. < Ideally the setting should exceed your typical transaction time, < so as to improve the odds that a lock will be released before < the waiter decides to check for deadlock. --- > Prefixes each message in the server log file with the process ID of > the server process. This is useful to sort out which messages > pertain to which connection. The default is off. This parameter > does not affect messages logged via syslog, which always contain > the process ID. 1437,1441c1746 < < transaction isolation level < < < DEFAULT_TRANSACTION_ISOLATION (string) --- > LOG_STATEMENT (boolean) 1444,1452c1749 < Each SQL transaction has an isolation level, which can be either < read committed or serializable. < This parameter controls the default isolation level of each new < transaction. The default is read committed. < < < < Consult and for more < information. --- > Causes each SQL statement to be logged. 1458,1462c1755 < < read-only transaction < < < DEFAULT_TRANSACTION_READ_ONLY (boolean) --- > LOG_TIMESTAMP (boolean) 1465,1471c1758,1759 < A read-only SQL transaction cannot alter non-temporary tables. < This parameter controls the default read-only status of each new < transaction. The default is false (read/write). < < < < Consult for more information. --- > Prefixes each server log message with a time stamp. The default > is off. 1477,1479c1765 < DYNAMIC_LIBRARY_PATH (string) < dynamic_library_path < dynamic loading --- > LOG_HOSTNAME (boolean) 1482,1517c1768,1772 < If a dynamically loadable module needs to be opened and the < specified name does not have a directory component (i.e. the < name does not contain a slash), the system will search this < path for the specified file. (The name that is used is the < name specified in the CREATE FUNCTION or < LOAD command.) < < < < The value for DYNAMIC_LIBRARY_PATH has to be a colon-separated < list of absolute directory names. If a directory name starts < with the special value $libdir, the < compiled-in PostgreSQL package < library directory is substituted. This where the modules < provided by the PostgreSQL < distribution are installed. (Use pg_config < --pkglibdir to print the name of this directory.) For < example: < < dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' < < < < < The default value for this parameter is < '$libdir'. If the value is set to an empty < string, the automatic path search is turned off. < < < < This parameter can be changed at run time by superusers, but a < setting done that way will only persist until the end of the < client connection, so this method should be reserved for < development purposes. The recommended way to set this parameter < is in the postgresql.conf configuration < file. --- > By default, connection logs only show the IP address of the > connecting host. If you want it to show the host name you can > turn this on, but depending on your host name resolution setup > it might impose a non-negligible performance penalty. This > option can only be set at server start. 1523,1531c1778 < < significant digits < < < display < of float numbers < < < EXTRA_FLOAT_DIGITS (integer) --- > LOG_SOURCE_PORT (boolean) 1534,1541c1781,1785 < This parameter adjusts the number of digits displayed for < floating-point values, including float4, float8, < and geometric data types. The parameter value is added to the < standard number of digits (FLT_DIG or DBL_DIG < as appropriate). The value can be set as high as 2, to include < partially-significant digits; this is especially useful for dumping < float data that needs to be restored exactly. Or it can be set < negative to suppress unwanted digits. --- > Shows the outgoing port number of the connecting host in the > connection log messages. You could trace back the port number > to find out what user initiated the connection. Other than > that, it's pretty useless and therefore off by default. This > option can only be set at server start. 1544a1789,1799 > > > > > > > Client Connection Defaults > > > Statement Behavior > 1547c1802,1804 < KRB_SERVER_KEYFILE (string) --- > SEARCH_PATH (string) > search_path > pathfor schemas 1550,1551c1807,1813 < Sets the location of the Kerberos server key file. See < for details. --- > This variable specifies the order in which schemas are searched > when an object (table, data type, function, etc.) is referenced by a > simple name with no schema component. When there are objects of > identical names in different schemas, the one found first > in the search path is used. An object that is not in any of the > schemas in the search path can only be referenced by specifying > its containing schema with a qualified (dotted) name. 1553,1554d1814 < < 1556,1559c1816,1822 < < < fsync < --- > > The value for search_path has to be a comma-separated > list of schema names. If one of the list items is > the special value $user, then the schema > having the name returned by SESSION_USER is substituted, if there > is such a schema. (If not, $user is ignored.) > 1561,1562d1823 < FSYNC (boolean) < 1564,1570c1825,1832 < If this option is on, the PostgreSQL server < will use the fsync() system call in several places < to make sure that updates are physically written to disk. This < insures that a database cluster will recover to a < consistent state after an operating system or hardware crash. < (Crashes of the database server itself are not < related to this.) --- > The system catalog schema, pg_catalog, is always > searched, whether it is mentioned in the path or not. If it is > mentioned in the path then it will be searched in the specified > order. If pg_catalog is not in the path then it will > be searched before searching any of the path items. > It should also be noted that the temporary-table schema, > pg_temp_nnn, is implicitly searched before any of > these. 1574,1582c1836,1839 < However, this operation does slow down < PostgreSQL because at transaction commit it has < wait for the operating system to flush the write-ahead log. < Without fsync, the operating system is allowed to < do its best in buffering, sorting, and delaying writes, which < can considerably increase performance. However, if the system < crashes, the results of the last few committed transactions may < be lost in part or whole. In the worst case, unrecoverable data < corruption may occur. --- > When objects are created without specifying a particular target > schema, they will be placed in the first schema listed > in the search path. An error is reported if the search path is > empty. 1586,1594c1843,1850 < For the above reasons, everyone can decide for himself what to < do with the fsync option. Some administrators < always leave it off, some turn it off only for bulk loads, < where there is a clear restart point if something goes wrong, < and some leave it on just to be on the safe side. The default < is on so that you are on the safe side. If you trust your < operating system, your hardware, and your utility company (or < better your battery backup), you can consider disabling < fsync. --- > The default value for this parameter is > '$user, public' (where the second part will be > ignored if there is no schema named public). > This supports shared use of a database (where no users > have private schemas, and all share use of public), > private per-user schemas, and combinations of these. Other > effects can be obtained by altering the default search path > setting, either globally or per-user. 1598,1602c1854,1859 < It should be noted that the performance penalty of having < fsync on is considerably less in < PostgreSQL version 7.1 and later. If you < previously suppressed fsync for performance < reasons, you may wish to reconsider your choice. --- > The current effective value of the search path can be examined > via the SQL function current_schemas(). This is not > quite the same as examining the value of > search_path, since current_schemas() > shows how the requests appearing in search_path > were resolved. 1606,1607c1863 < This option can only be set at server start or in the < postgresql.conf file. --- > For more information on schema handling, see . 1611a1868 > 1613c1870,1874 < LC_MESSAGES (string) --- > > transaction isolation level > > > DEFAULT_TRANSACTION_ISOLATION (string) 1616,1620c1877,1880 < Sets the language in which messages are displayed. Acceptable < values are system-dependent; see for < more information. If this variable is set to the empty string < (which is the default) then the value is inherited from the < execution environment of the server in a system-dependent way. --- > Each SQL transaction has an isolation level, which can be either > read committed or serializable. > This parameter controls the default isolation level of each new > transaction. The default is read committed. 1624,1628c1884,1885 < On some systems, this locale category does not exist. Setting < this variable will still work, but there will be no effect. < Also, there is a chance that no translated messages for the < desired language exist. In that case you will continue to see < the English messages. --- > Consult and for more > information. 1634,1646c1891,1893 < LC_MONETARY (string) < < < Sets the locale to use for formatting monetary amounts, for < example with the to_char family of < functions. Acceptable values are system-dependent; see for more information. If this variable is < set to the empty string (which is the default) then the value < is inherited from the execution environment of the server in a < system-dependent way. < < < --- > > read-only transaction > 1648,1649c1895 < < LC_NUMERIC (string) --- > DEFAULT_TRANSACTION_READ_ONLY (boolean) 1652,1658c1898,1900 < Sets the locale to use for formatting numbers, for example < with the to_char() family of < functions. Acceptable values are system-dependent; see for more information. If this variable is < set to the empty string (which is the default) then the value < is inherited from the execution environment of the server in a < system-dependent way. --- > A read-only SQL transaction cannot alter non-temporary tables. > This parameter controls the default read-only status of each new > transaction. The default is false (read/write). 1660,1661d1901 < < 1663,1665d1902 < < LC_TIME (string) < 1667,1673c1904 < Sets the locale to use for formatting date and time values. < (Currently, this setting does nothing, but it may in the < future.) Acceptable values are system-dependent; see for more information. If this variable is < set to the empty string (which is the default) then the value < is inherited from the execution environment of the server in a < system-dependent way. --- > Consult for more information. 1677c1908 < --- > 1679c1910 < MAX_CONNECTIONS (integer) --- > STATEMENT_TIMEOUT (integer) 1682,1685c1913,1914 < Determines the maximum number of concurrent connections to the < database server. The default is 32 (unless altered while < building the server). This parameter can only be set at server < start. --- > Aborts any statement that takes over the specified number of > milliseconds. A value of zero turns off the timer. 1688a1918,1924 > > > > > Locale and Formatting > > 1691c1927,1928 < MAX_EXPR_DEPTH (integer) --- > DATESTYLE (string) > date style 1694,1697c1931,1934 < Sets the maximum expression nesting depth of the parser. The < default value is high enough for any normal query, but you can < raise it if needed. (But if you raise it too high, you run < the risk of server crashes due to stack overflow.) --- > Sets the display format for date and time values, as well as > the rules for interpreting ambiguous date input values. See > for more information. The > default is ISO, US. 1703c1940,1941 < MAX_FILES_PER_PROCESS (integer) --- > TIMEZONE (string) > time zone 1706,1719c1944,1947 < Sets the maximum number of simultaneously open files allowed to each < server subprocess. The default is 1000. The limit actually used < by the code is the smaller of this setting and the result of < sysconf(_SC_OPEN_MAX). Therefore, on systems < where sysconf returns a reasonable limit, you don't < need to worry about this setting. But on some platforms < (notably, most BSD systems), sysconf returns a < value that is much larger than the system can really support < when a large number of processes all try to open that many < files. If you find yourself seeing Too many open files < failures, try reducing this setting. This option can only be set < at server start or in the postgresql.conf < configuration file; if changed in the configuration file, it < only affects subsequently-started server subprocesses. --- > Sets the time zone for displaying and interpreting time > stamps. The default is to use whatever the system environment > specifies as the time zone. See linkend="datatype-datetime"> for more information. 1725c1953,1954 < MAX_FSM_PAGES (integer) --- > AUSTRALIAN_TIMEZONES (boolean) > Australian time zones 1728,1732c1957,1961 < Sets the maximum number of disk pages for which free space will < be tracked in the shared free-space map. Six bytes of shared memory < are consumed for each page slot. This setting must be more than < 16 * max_fsm_relations. The default is 20000. < This option can only be set at server start. --- > If set to true, ACST, > CST, EST, and > SAT are interpreted as Australian time > zones rather than as North/South American time zones and > Saturday. The default is false. 1738c1967,1975 < MAX_FSM_RELATIONS (integer) --- > > significant digits > > > display > of float numbers > > > EXTRA_FLOAT_DIGITS (integer) 1741,1745c1978,1985 < Sets the maximum number of relations (tables and indexes) for which < free space will be tracked in the shared free-space map. Roughly < fifty bytes of shared memory are consumed for each slot. < The default is 1000. < This option can only be set at server start. --- > This parameter adjusts the number of digits displayed for > floating-point values, including float4, float8, > and geometric data types. The parameter value is added to the > standard number of digits (FLT_DIG or DBL_DIG > as appropriate). The value can be set as high as 2, to include > partially-significant digits; this is especially useful for dumping > float data that needs to be restored exactly. Or it can be set > negative to suppress unwanted digits. 1749a1990 > 1751c1992 < MAX_LOCKS_PER_TRANSACTION (integer) --- > LC_MESSAGES (string) 1754,1760c1995,1999 < The shared lock table is sized on the assumption that at most < max_locks_per_transaction * < max_connections distinct objects will need to < be locked at any one time. The default, 64, has historically < proven sufficient, but you might need to raise this value if you < have clients that touch many different tables in a single < transaction. This option can only be set at server start. --- > Sets the language in which messages are displayed. Acceptable > values are system-dependent; see for > more information. If this variable is set to the empty string > (which is the default) then the value is inherited from the > execution environment of the server in a system-dependent way. 1762,1763d2000 < < 1765,1767d2001 < < PASSWORD_ENCRYPTION (boolean) < 1769,1772c2003,2007 < When a password is specified in CREATE USER or < ALTER USER without writing either ENCRYPTED or < UNENCRYPTED, this option determines whether the password is to be < encrypted. The default is on (encrypt the password). --- > On some systems, this locale category does not exist. Setting > this variable will still work, but there will be no effect. > Also, there is a chance that no translated messages for the > desired language exist. In that case you will continue to see > the English messages. 1778,1779c2013 < PORT (integer) < port --- > LC_MONETARY (string) 1782,1783c2016,2022 < The TCP port the server listens on; 5432 by default. This < option can only be set at server start. --- > Sets the locale to use for formatting monetary amounts, for > example with the to_char family of > functions. Acceptable values are system-dependent; see linkend="locale"> for more information. If this variable is > set to the empty string (which is the default) then the value > is inherited from the execution environment of the server in a > system-dependent way. 1789,1790c2028 < PRELOAD_LIBRARIES (string) < preload_libraries --- > LC_NUMERIC (string) 1793,1808c2031,2037 < This variable specifies one or more shared libraries that are < to be preloaded at server start. An initialization function < can also be optionally specified by adding a colon followed by < the name of the initialization function after the library < name. For example < '$libdir/mylib:init_mylib' would cause < mylib to be preloaded and init_mylib < to be executed. If more than one library is to be loaded, they < must be delimited with a comma. < < < < If mylib is not found, the server will fail to < start. However, if init_mylib is not found, < mylib will still be preloaded without executing < the initialization function. --- > Sets the locale to use for formatting numbers, for example > with the to_char() family of > functions. Acceptable values are system-dependent; see linkend="locale"> for more information. If this variable is > set to the empty string (which is the default) then the value > is inherited from the execution environment of the server in a > system-dependent way. 1809a2039,2040 > > 1810a2042,2044 > > LC_TIME (string) > 1812,1814c2046,2052 < By preloading a shared library (and initializing it if < applicable), the library startup time is avoided when the < library is first used. --- > Sets the locale to use for formatting date and time values. > (Currently, this setting does nothing, but it may in the > future.) Acceptable values are system-dependent; see linkend="locale"> for more information. If this variable is > set to the empty string (which is the default) then the value > is inherited from the execution environment of the server in a > system-dependent way. 1820,1821c2058,2059 < REGEX_FLAVOR (string) < regular expressions --- > CLIENT_ENCODING (string) > character set encoding 1824,1828c2062,2063 < The regular expression flavor can be set to < advanced, extended, or basic. < The usual default is advanced. The extended < setting may be useful for exact backwards compatibility with < pre-7.4 releases of PostgreSQL. --- > Sets the client-side encoding (character set). > The default is to use the database encoding. 1832a2068,2074 > > > > Other Defaults > > > 1834,1836c2076 < SEARCH_PATH (string) < search_path < pathfor schemas --- > PASSWORD_ENCRYPTION (boolean) 1839,1845c2079,2082 < This variable specifies the order in which schemas are searched < when an object (table, data type, function, etc.) is referenced by a < simple name with no schema component. When there are objects of < identical names in different schemas, the one found first < in the search path is used. An object that is not in any of the < schemas in the search path can only be referenced by specifying < its containing schema with a qualified (dotted) name. --- > When a password is specified in CREATE USER or > ALTER USER without writing either ENCRYPTED or > UNENCRYPTED, this option determines whether the password is to be > encrypted. The default is on (encrypt the password). 1846a2084,2085 > > 1848,1854d2086 < < The value for search_path has to be a comma-separated < list of schema names. If one of the list items is < the special value $user, then the schema < having the name returned by SESSION_USER is substituted, if there < is such a schema. (If not, $user is ignored.) < 1855a2088,2092 > > DYNAMIC_LIBRARY_PATH (string) > dynamic_library_path > dynamic loading > 1857,1864c2094,2099 < The system catalog schema, pg_catalog, is always < searched, whether it is mentioned in the path or not. If it is < mentioned in the path then it will be searched in the specified < order. If pg_catalog is not in the path then it will < be searched before searching any of the path items. < It should also be noted that the temporary-table schema, < pg_temp_nnn, is implicitly searched before any of < these. --- > If a dynamically loadable module needs to be opened and the > specified name does not have a directory component (i.e. the > name does not contain a slash), the system will search this > path for the specified file. (The name that is used is the > name specified in the CREATE FUNCTION or > LOAD command.) 1868,1871c2103,2114 < When objects are created without specifying a particular target < schema, they will be placed in the first schema listed < in the search path. An error is reported if the search path is < empty. --- > The value for DYNAMIC_LIBRARY_PATH has to be a colon-separated > list of absolute directory names. If a directory name starts > with the special value $libdir, the > compiled-in PostgreSQL package > library directory is substituted. This where the modules > provided by the PostgreSQL > distribution are installed. (Use pg_config > --pkglibdir to print the name of this directory.) For > example: > > dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' > 1876,1882c2119,2120 < '$user, public' (where the second part will be < ignored if there is no schema named public). < This supports shared use of a database (where no users < have private schemas, and all share use of public), < private per-user schemas, and combinations of these. Other < effects can be obtained by altering the default search path < setting, either globally or per-user. --- > '$libdir'. If the value is set to an empty > string, the automatic path search is turned off. 1886,1891c2124,2129 < The current effective value of the search path can be examined < via the SQL function current_schemas(). This is not < quite the same as examining the value of < search_path, since current_schemas() < shows how the requests appearing in search_path < were resolved. --- > This parameter can be changed at run time by superusers, but a > setting done that way will only persist until the end of the > client connection, so this method should be reserved for > development purposes. The recommended way to set this parameter > is in the postgresql.conf configuration > file. 1892a2131,2133 > > > 1893a2135,2151 > > > > > > Statistics > > > Statistics Monitoring > > > > LOG_STATEMENT_STATS (boolean) > LOG_PARSER_STATS (boolean) > LOG_PLANNER_STATS (boolean) > LOG_EXECUTOR_STATS (boolean) > 1895c2153,2155 < For more information on schema handling, see . --- > For each query, write performance statistics of the respective > module to the server log. This is a crude profiling > instrument. 1901c2161 < SHARED_BUFFERS (integer) --- > DEFAULT_STATISTICS_TARGET (integer) 1904,1911c2164,2168 < Sets the number of shared memory buffers used by the database < server. The default is 64. Each buffer is typically 8192 < bytes. This must be greater than 16, as well as at least twice < the value of MAX_CONNECTIONS; however, a < higher value can often improve performance. < Values of a few thousand are recommended < for production installations. This option can only be set at < server start. --- > Sets the default statistics target for table columns that have not > had a column-specific target set via ALTER TABLE SET > STATISTICS. Larger values increase the time needed to do > ANALYZE, but may improve the quality of the planner's > estimates. The default value is 10. 1912a2170,2178 > > > > > > > > Query and Index Statistics Collector > 1913a2180,2182 > > STATS_START_COLLECTOR (boolean) > 1915,1919c2184,2188 < Increasing this parameter may cause PostgreSQL < to request more System V shared < memory than your operating system's default configuration < allows. See for information on how to < adjust these parameters, if necessary. --- > Controls whether the server should start the > statistics-collection subprocess. This is on by default, but > may be turned off if you know you have no interest in > collecting statistics. This option can only be set at server > start. 1925c2194 < SILENT_MODE (boolean) --- > STATS_COMMAND_STRING (boolean) 1928,1934c2197,2205 < Runs the server silently. If this option is set, the server < will automatically run in background and any controlling terminals < are disassociated. Thus, no messages are written to standard < output or standard error (same effect as postmaster's < option). Unless some logging system such as < syslog is enabled, using this option is < discouraged since it makes it impossible to see error messages. --- > Enables the collection of statistics on the currently > executing command of each session, along with the time at > which that command began execution. This option is off by > default. Note that even when enabled, this information is not > visible to all users, only to superusers and the user owning > the session being reported on; so it should not represent a > security risk. This data can be accessed via the > pg_stat_activity system view; refer > to for more information. 1940c2211,2212 < SORT_MEM (integer) --- > STATS_BLOCK_LEVEL (boolean) > STATS_ROW_LEVEL (boolean) 1943,1954c2215,2220 < Specifies the amount of memory to be used by internal sort operations and < hash tables before switching to temporary disk files. The value is < specified in kilobytes, and defaults to 1024 kilobytes (1 MB). < Note that for a complex query, several sort or hash operations might be < running in parallel; each one will be allowed to use as much memory < as this value specifies before it starts to put data into temporary < files. Also, several running sessions could be doing < sort operations simultaneously. So the total memory used could be many < times the value of SORT_MEM. Sort operations are used < by ORDER BY, merge joins, and CREATE INDEX. < Hash tables are used in hash joins, hash-based aggregation, and < hash-based processing of IN subqueries. --- > These enable the collection of block-level and row-level statistics > on database activity, respectively. These options are off by > default. This data can be accessed via the > pg_stat and > pg_statio family of system views; > refer to for more information. 1960,1961c2226 < SQL_INHERITANCE (boolean) < inheritance --- > STATS_RESET_ON_SERVER_START (boolean) 1964,1970c2229,2232 < This controls the inheritance semantics, in particular whether < subtables are included by various commands by default. They were < not included in versions prior to 7.1. If you need the old < behavior you can set this variable to off, but in the long run < you are encouraged to change your applications to use the < ONLY key word to exclude subtables. See < for more information about inheritance. --- > If on, collected statistics are zeroed out whenever the server > is restarted. If off, statistics are accumulated across server > restarts. The default is on. This option can only be set at > server start. 1974a2237,2245 > > > > > > Lock Management > > > 1977c2248,2253 < SSL --- > deadlock > timeout > > > timeout > deadlock 1980c2256 < SSL (boolean) --- > DEADLOCK_TIMEOUT (integer) 1983,1985c2259,2287 < Enables SSL connections. Please read < before using this. The default < is off. --- > This is the amount of time, in milliseconds, to wait on a lock > before checking to see if there is a deadlock condition. The > check for deadlock is relatively slow, so the server doesn't run > it every time it waits for a lock. We (optimistically?) assume > that deadlocks are not common in production applications and > just wait on the lock for a while before starting the check for a > deadlock. Increasing this value reduces the amount of time > wasted in needless deadlock checks, but slows down reporting of > real deadlock errors. The default is 1000 (i.e., one second), > which is probably about the smallest value you would want in > practice. On a heavily loaded server you might want to raise it. > Ideally the setting should exceed your typical transaction time, > so as to improve the odds that a lock will be released before > the waiter decides to check for deadlock. > > > > > > MAX_LOCKS_PER_TRANSACTION (integer) > > > The shared lock table is sized on the assumption that at most > max_locks_per_transaction * > max_connections distinct objects will need to > be locked at any one time. The default, 64, has historically > proven sufficient, but you might need to raise this value if you > have clients that touch many different tables in a single > transaction. This option can only be set at server start. 1989a2292,2301 > > > > > Version and Platform Compatibility > > > Previous Postgres Versions > > 1991c2303,2304 < STATEMENT_TIMEOUT (integer) --- > ADD_MISSING_FROM (boolean) > missing from 1994,1995d2306 < Aborts any statement that takes over the specified number of < milliseconds. A value of zero turns off the timer. 2001,2002c2312,2313 < SUPERUSER_RESERVED_CONNECTIONS < (integer) --- > REGEX_FLAVOR (string) > regular expressions 2005,2017c2316,2320 < Determines the number of connection slots that < are reserved for connections by PostgreSQL < superusers. At most max_connections connections can < ever be active simultaneously. Whenever the number of active < concurrent connections is at least max_connections minus < superuser_reserved_connections, new connections < will be accepted only for superusers. < < < < The default value is 2. The value must be less than the value of < max_connections. This parameter can only be < set at server start. --- > The regular expression flavor can be set to > advanced, extended, or basic. > The usual default is advanced. The extended > setting may be useful for exact backwards compatibility with > pre-7.4 releases of PostgreSQL. 2023c2326,2327 < TCPIP_SOCKET (boolean) --- > SQL_INHERITANCE (boolean) > inheritance 2026,2029c2330,2336 < If this is true, then the server will accept TCP/IP connections. < Otherwise only local Unix domain socket connections are < accepted. It is off by default. This option can only be set at < server start. --- > This controls the inheritance semantics, in particular whether > subtables are included by various commands by default. They were > not included in versions prior to 7.1. If you need the old > behavior you can set this variable to off, but in the long run > you are encouraged to change your applications to use the > ONLY key word to exclude subtables. See > for more information about inheritance. 2033a2341,2346 > > > > Platform and Client Compatibility > > 2035,2036c2348,2349 < TIMEZONE (string) < time zone --- > HAS_RENDEZVOUS (boolean) > rendezvous 2039,2042d2351 < Sets the time zone for displaying and interpreting time < stamps. The default is to use whatever the system environment < specifies as the time zone. See for more information. 2090,2100c2399,2415 < < UNIX_SOCKET_DIRECTORY (string) < < < Specifies the directory of the Unix-domain socket on which the < server is to listen for < connections from client applications. The default is normally < /tmp, but can be changed at build time. < < < --- > > > > > > Source Developer Options > > > The following options are for work on the PostgreSQL source and for severly > crashed databases only. There should be no reason to use them in a production > database setup. As such, they have been excluded from the postgresql.conf file. > Additionally, many of these options require special source compilation flags > to work. > > > > 2103c2418 < UNIX_SOCKET_GROUP (string) --- > DEBUG_ASSERTIONS (boolean) 2106,2113c2421,2430 < Sets the group owner of the Unix domain socket. (The owning < user of the socket is always the user that starts the < server.) In combination with the option < UNIX_SOCKET_PERMISSIONS this can be used as < an additional access control mechanism for this socket type. < By default this is the empty string, which uses the default < group for the current user. This option can only be set at < server start. --- > Turns on various assertion checks. This is a debugging aid. If > you are experiencing strange problems or crashes you might want > to turn this on, as it might expose programming mistakes. To use > this option, the macro USE_ASSERT_CHECKING > must be defined when PostgreSQL is > built (accomplished by the configure option > ). Note that > DEBUG_ASSERTIONS defaults to on if > PostgreSQL has been built with > assertions enabled. 2118,2119c2435,2436 < < UNIX_SOCKET_PERMISSIONS (integer) --- > > TRACE_NOTIFY (boolean) 2122,2147c2439,2444 < Sets the access permissions of the Unix domain socket. Unix < domain sockets use the usual Unix file system permission set. < The option value is expected to be an numeric mode < specification in the form accepted by the < chmod and umask < system calls. (To use the customary octal format the number < must start with a 0 (zero).) < < < < The default permissions are 0777, meaning < anyone can connect. Reasonable alternatives are < 0770 (only user and group, see also under < UNIX_SOCKET_GROUP) and 0700 < (only user). (Note that actually for a Unix domain socket, only write < permission matters and there is no point in setting or revoking < read or execute permissions.) < < < < This access control mechanism is independent of the one < described in . < < < < This option can only be set at server start. --- > Generates a great amount of debugging output for the > LISTEN and NOTIFY > commands. > or > must be DEBUG1 or lower to send output to the client > or server logs. 2153c2450,2455 < VACUUM_MEM (integer) --- > TRACE_LOCKS (boolean) > TRACE_USERLOCKS (boolean) > TRACE_LOCK_OIDMIN (boolean) > TRACE_LOCK_TABLE (boolean) > DEBUG_DEADLOCKS (boolean) > SHOW_BTREE_BUILD_STATS (boolean) 2156,2160c2458 < Specifies the maximum amount of memory to be used by < VACUUM to keep track of to-be-reclaimed < tuples. The value is specified in kilobytes, and defaults to < 8192 kilobytes. Larger settings may improve the speed of < vacuuming large tables that have many deleted tuples. --- > Various other code tracing and debugging options. 2165,2166c2463,2464 < < VIRTUAL_HOST (string) --- > > WAL_DEBUG (integer) 2169,2172c2467 < Specifies the host name or IP address on which the server is < to listen for connections from client applications. The < default is to listening on all configured addresses (including < localhost). --- > If nonzero, turn on WAL-related debugging output to the server log. 2177c2472 < --- > 2196,2309c2491,2493 < < < < < < WAL < < < See also for details on WAL < tuning. < < < < CHECKPOINT_SEGMENTS (integer) < < < Maximum distance between automatic WAL checkpoints, in log file < segments (each segment is normally 16 megabytes). < This option can only be set at server start or in the < postgresql.conf file. < < < < < < CHECKPOINT_TIMEOUT (integer) < < < Maximum time between automatic WAL checkpoints, in seconds. < This option can only be set at server start or in the < postgresql.conf file. < < < < < < CHECKPOINT_WARNING (integer) < < < Send a message to the server logs if checkpoints caused by the < filling of checkpoint segment files happens more frequently than < this number of seconds. Zero turns off the warning. < < < < < < COMMIT_DELAY (integer) < < < Time delay between writing a commit record to the WAL buffer and < flushing the buffer out to disk, in microseconds. A nonzero < delay allows multiple transactions to be committed with only one < fsync system call, if system load is high < enough additional transactions may become ready to commit within < the given interval. But the delay is just wasted if no other < transactions become ready to commit. Therefore, the delay is < only performed if at least COMMIT_SIBLINGS other transactions < are active at the instant that a server process has written its commit < record. < < < < < < COMMIT_SIBLINGS (integer) < < < Minimum number of concurrent open transactions to require before < performing the COMMIT_DELAY delay. A larger value < makes it more probable that at least one other transaction will < become ready to commit during the delay interval. < < < < < < WAL_BUFFERS (integer) < < < Number of disk-page buffers in shared memory for WAL < logging. The default is 4. This option can only be set at < server start. < < < < < < WAL_DEBUG (integer) < < < If nonzero, turn on WAL-related debugging output to the server log. < < < < < < WAL_SYNC_METHOD (string) < < < Method used for forcing WAL updates out to disk. Possible < values are < FSYNC (call fsync() at each commit), < FDATASYNC (call fdatasync() at each commit), < OPEN_SYNC (write WAL files with open() option O_SYNC), and < OPEN_DATASYNC (write WAL files with open() option O_DSYNC). < Not all of these choices are available on all platforms. < This option can only be set at server start or in the < postgresql.conf file. < < < < < --- > > > 2311,2312d2494 < <