gooderp18绿色标准版
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

764 líneas
59KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>19.11. Client Connection Defaults</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="runtime-config-autovacuum.html" title="19.10. Automatic Vacuuming" /><link rel="next" href="runtime-config-locks.html" title="19.12. Lock Management" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">19.11. Client Connection Defaults</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="runtime-config-autovacuum.html" title="19.10. Automatic Vacuuming">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="runtime-config.html" title="Chapter 19. Server Configuration">Up</a></td><th width="60%" align="center">Chapter 19. Server Configuration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="runtime-config-locks.html" title="19.12. Lock Management">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="RUNTIME-CONFIG-CLIENT"><div class="titlepage"><div><div><h2 class="title" style="clear: both">19.11. Client Connection Defaults</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT">19.11.1. Statement Behavior</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT">19.11.2. Locale and Formatting</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-PRELOAD">19.11.3. Shared Library Preloading</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-OTHER">19.11.4. Other Defaults</a></span></dt></dl></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-STATEMENT"><div class="titlepage"><div><div><h3 class="title">19.11.1. Statement Behavior</h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt id="GUC-CLIENT-MIN-MESSAGES"><span class="term"><code class="varname">client_min_messages</code> (<code class="type">enum</code>)
  3. <a id="id-1.6.6.14.2.2.1.1.3" class="indexterm"></a>
  4. </span></dt><dd><p>
  5. Controls which
  6. <a class="link" href="runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS" title="Table 19.1. Message Severity Levels">message levels</a>
  7. are sent to the client.
  8. Valid values are <code class="literal">DEBUG5</code>,
  9. <code class="literal">DEBUG4</code>, <code class="literal">DEBUG3</code>, <code class="literal">DEBUG2</code>,
  10. <code class="literal">DEBUG1</code>, <code class="literal">LOG</code>, <code class="literal">NOTICE</code>,
  11. <code class="literal">WARNING</code>, and <code class="literal">ERROR</code>.
  12. Each level includes all the levels that follow it. The later the level,
  13. the fewer messages are sent. The default is
  14. <code class="literal">NOTICE</code>. Note that <code class="literal">LOG</code> has a different
  15. rank here than in <a class="xref" href="runtime-config-logging.html#GUC-LOG-MIN-MESSAGES">log_min_messages</a>.
  16. </p><p>
  17. <code class="literal">INFO</code> level messages are always sent to the client.
  18. </p></dd><dt id="GUC-SEARCH-PATH"><span class="term"><code class="varname">search_path</code> (<code class="type">string</code>)
  19. <a id="id-1.6.6.14.2.2.2.1.3" class="indexterm"></a>
  20. <a id="id-1.6.6.14.2.2.2.1.4" class="indexterm"></a>
  21. </span></dt><dd><p>
  22. This variable specifies the order in which schemas are searched
  23. when an object (table, data type, function, etc.) is referenced by a
  24. simple name with no schema specified. When there are objects of
  25. identical names in different schemas, the one found first
  26. in the search path is used. An object that is not in any of the
  27. schemas in the search path can only be referenced by specifying
  28. its containing schema with a qualified (dotted) name.
  29. </p><p>
  30. The value for <code class="varname">search_path</code> must be a comma-separated
  31. list of schema names. Any name that is not an existing schema, or is
  32. a schema for which the user does not have <code class="literal">USAGE</code>
  33. permission, is silently ignored.
  34. </p><p>
  35. If one of the list items is the special name
  36. <code class="literal">$user</code>, then the schema having the name returned by
  37. <code class="function">CURRENT_USER</code> is substituted, if there is such a schema
  38. and the user has <code class="literal">USAGE</code> permission for it.
  39. (If not, <code class="literal">$user</code> is ignored.)
  40. </p><p>
  41. The system catalog schema, <code class="literal">pg_catalog</code>, is always
  42. searched, whether it is mentioned in the path or not. If it is
  43. mentioned in the path then it will be searched in the specified
  44. order. If <code class="literal">pg_catalog</code> is not in the path then it will
  45. be searched <span class="emphasis"><em>before</em></span> searching any of the path items.
  46. </p><p>
  47. Likewise, the current session's temporary-table schema,
  48. <code class="literal">pg_temp_<em class="replaceable"><code>nnn</code></em></code>, is always searched if it
  49. exists. It can be explicitly listed in the path by using the
  50. alias <code class="literal">pg_temp</code><a id="id-1.6.6.14.2.2.2.2.5.3" class="indexterm"></a>. If it is not listed in the path then
  51. it is searched first (even before <code class="literal">pg_catalog</code>). However,
  52. the temporary schema is only searched for relation (table, view,
  53. sequence, etc) and data type names. It is never searched for
  54. function or operator names.
  55. </p><p>
  56. When objects are created without specifying a particular target
  57. schema, they will be placed in the first valid schema named in
  58. <code class="varname">search_path</code>. An error is reported if the search
  59. path is empty.
  60. </p><p>
  61. The default value for this parameter is
  62. <code class="literal">"$user", public</code>.
  63. This setting supports shared use of a database (where no users
  64. have private schemas, and all share use of <code class="literal">public</code>),
  65. private per-user schemas, and combinations of these. Other
  66. effects can be obtained by altering the default search path
  67. setting, either globally or per-user.
  68. </p><p>
  69. For more information on schema handling, see
  70. <a class="xref" href="ddl-schemas.html" title="5.9. Schemas">Section 5.9</a>. In particular, the default
  71. configuration is suitable only when the database has a single user or
  72. a few mutually-trusting users.
  73. </p><p>
  74. The current effective value of the search path can be examined
  75. via the <acronym class="acronym">SQL</acronym> function
  76. <code class="function">current_schemas</code>
  77. (see <a class="xref" href="functions-info.html" title="9.25. System Information Functions and Operators">Section 9.25</a>).
  78. This is not quite the same as
  79. examining the value of <code class="varname">search_path</code>, since
  80. <code class="function">current_schemas</code> shows how the items
  81. appearing in <code class="varname">search_path</code> were resolved.
  82. </p></dd><dt id="GUC-ROW-SECURITY"><span class="term"><code class="varname">row_security</code> (<code class="type">boolean</code>)
  83. <a id="id-1.6.6.14.2.2.3.1.3" class="indexterm"></a>
  84. </span></dt><dd><p>
  85. This variable controls whether to raise an error in lieu of applying a
  86. row security policy. When set to <code class="literal">on</code>, policies apply
  87. normally. When set to <code class="literal">off</code>, queries fail which would
  88. otherwise apply at least one policy. The default is <code class="literal">on</code>.
  89. Change to <code class="literal">off</code> where limited row visibility could cause
  90. incorrect results; for example, <span class="application">pg_dump</span> makes that
  91. change by default. This variable has no effect on roles which bypass
  92. every row security policy, to wit, superusers and roles with
  93. the <code class="literal">BYPASSRLS</code> attribute.
  94. </p><p>
  95. For more information on row security policies,
  96. see <a class="xref" href="sql-createpolicy.html" title="CREATE POLICY"><span class="refentrytitle">CREATE POLICY</span></a>.
  97. </p></dd><dt id="GUC-DEFAULT-TABLE-ACCESS-METHOD"><span class="term"><code class="varname">default_table_access_method</code> (<code class="type">string</code>)
  98. <a id="id-1.6.6.14.2.2.4.1.3" class="indexterm"></a>
  99. </span></dt><dd><p>
  100. This parameter specifies the default table access method to use when
  101. creating tables or materialized views if the <code class="command">CREATE</code>
  102. command does not explicitly specify an access method, or when
  103. <code class="command">SELECT ... INTO</code> is used, which does not allow to
  104. specify a table access method. The default is <code class="literal">heap</code>.
  105. </p></dd><dt id="GUC-DEFAULT-TABLESPACE"><span class="term"><code class="varname">default_tablespace</code> (<code class="type">string</code>)
  106. <a id="id-1.6.6.14.2.2.5.1.3" class="indexterm"></a>
  107. <a id="id-1.6.6.14.2.2.5.1.4" class="indexterm"></a>
  108. </span></dt><dd><p>
  109. This variable specifies the default tablespace in which to create
  110. objects (tables and indexes) when a <code class="command">CREATE</code> command does
  111. not explicitly specify a tablespace. It also determines the tablespace
  112. that a partitioned relation will direct future partitions to.
  113. </p><p>
  114. The value is either the name of a tablespace, or an empty string
  115. to specify using the default tablespace of the current database.
  116. If the value does not match the name of any existing tablespace,
  117. <span class="productname">PostgreSQL</span> will automatically use the default
  118. tablespace of the current database. If a nondefault tablespace
  119. is specified, the user must have <code class="literal">CREATE</code> privilege
  120. for it, or creation attempts will fail.
  121. </p><p>
  122. This variable is not used for temporary tables; for them,
  123. <a class="xref" href="runtime-config-client.html#GUC-TEMP-TABLESPACES">temp_tablespaces</a> is consulted instead.
  124. </p><p>
  125. This variable is also not used when creating databases.
  126. By default, a new database inherits its tablespace setting from
  127. the template database it is copied from.
  128. </p><p>
  129. For more information on tablespaces,
  130. see <a class="xref" href="manage-ag-tablespaces.html" title="22.6. Tablespaces">Section 22.6</a>.
  131. </p></dd><dt id="GUC-TEMP-TABLESPACES"><span class="term"><code class="varname">temp_tablespaces</code> (<code class="type">string</code>)
  132. <a id="id-1.6.6.14.2.2.6.1.3" class="indexterm"></a>
  133. <a id="id-1.6.6.14.2.2.6.1.4" class="indexterm"></a>
  134. </span></dt><dd><p>
  135. This variable specifies tablespaces in which to create temporary
  136. objects (temp tables and indexes on temp tables) when a
  137. <code class="command">CREATE</code> command does not explicitly specify a tablespace.
  138. Temporary files for purposes such as sorting large data sets
  139. are also created in these tablespaces.
  140. </p><p>
  141. The value is a list of names of tablespaces. When there is more than
  142. one name in the list, <span class="productname">PostgreSQL</span> chooses a random
  143. member of the list each time a temporary object is to be created;
  144. except that within a transaction, successively created temporary
  145. objects are placed in successive tablespaces from the list.
  146. If the selected element of the list is an empty string,
  147. <span class="productname">PostgreSQL</span> will automatically use the default
  148. tablespace of the current database instead.
  149. </p><p>
  150. When <code class="varname">temp_tablespaces</code> is set interactively, specifying a
  151. nonexistent tablespace is an error, as is specifying a tablespace for
  152. which the user does not have <code class="literal">CREATE</code> privilege. However,
  153. when using a previously set value, nonexistent tablespaces are
  154. ignored, as are tablespaces for which the user lacks
  155. <code class="literal">CREATE</code> privilege. In particular, this rule applies when
  156. using a value set in <code class="filename">postgresql.conf</code>.
  157. </p><p>
  158. The default value is an empty string, which results in all temporary
  159. objects being created in the default tablespace of the current
  160. database.
  161. </p><p>
  162. See also <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TABLESPACE">default_tablespace</a>.
  163. </p></dd><dt id="GUC-CHECK-FUNCTION-BODIES"><span class="term"><code class="varname">check_function_bodies</code> (<code class="type">boolean</code>)
  164. <a id="id-1.6.6.14.2.2.7.1.3" class="indexterm"></a>
  165. </span></dt><dd><p>
  166. This parameter is normally on. When set to <code class="literal">off</code>, it
  167. disables validation of the function body string during <a class="xref" href="sql-createfunction.html" title="CREATE FUNCTION"><span class="refentrytitle">CREATE FUNCTION</span></a>. Disabling validation avoids side
  168. effects of the validation process and avoids false positives due
  169. to problems such as forward references. Set this parameter
  170. to <code class="literal">off</code> before loading functions on behalf of other
  171. users; <span class="application">pg_dump</span> does so automatically.
  172. </p></dd><dt id="GUC-DEFAULT-TRANSACTION-ISOLATION"><span class="term"><code class="varname">default_transaction_isolation</code> (<code class="type">enum</code>)
  173. <a id="id-1.6.6.14.2.2.8.1.3" class="indexterm"></a>
  174. <a id="id-1.6.6.14.2.2.8.1.4" class="indexterm"></a>
  175. </span></dt><dd><p>
  176. Each SQL transaction has an isolation level, which can be
  177. either <span class="quote">“<span class="quote">read uncommitted</span>”</span>, <span class="quote">“<span class="quote">read
  178. committed</span>”</span>, <span class="quote">“<span class="quote">repeatable read</span>”</span>, or
  179. <span class="quote">“<span class="quote">serializable</span>”</span>. This parameter controls the
  180. default isolation level of each new transaction. The default
  181. is <span class="quote">“<span class="quote">read committed</span>”</span>.
  182. </p><p>
  183. Consult <a class="xref" href="mvcc.html" title="Chapter 13. Concurrency Control">Chapter 13</a> and <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> for more information.
  184. </p></dd><dt id="GUC-DEFAULT-TRANSACTION-READ-ONLY"><span class="term"><code class="varname">default_transaction_read_only</code> (<code class="type">boolean</code>)
  185. <a id="id-1.6.6.14.2.2.9.1.3" class="indexterm"></a>
  186. <a id="id-1.6.6.14.2.2.9.1.4" class="indexterm"></a>
  187. </span></dt><dd><p>
  188. A read-only SQL transaction cannot alter non-temporary tables.
  189. This parameter controls the default read-only status of each new
  190. transaction. The default is <code class="literal">off</code> (read/write).
  191. </p><p>
  192. Consult <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> for more information.
  193. </p></dd><dt id="GUC-DEFAULT-TRANSACTION-DEFERRABLE"><span class="term"><code class="varname">default_transaction_deferrable</code> (<code class="type">boolean</code>)
  194. <a id="id-1.6.6.14.2.2.10.1.3" class="indexterm"></a>
  195. <a id="id-1.6.6.14.2.2.10.1.4" class="indexterm"></a>
  196. </span></dt><dd><p>
  197. When running at the <code class="literal">serializable</code> isolation level,
  198. a deferrable read-only SQL transaction may be delayed before
  199. it is allowed to proceed. However, once it begins executing
  200. it does not incur any of the overhead required to ensure
  201. serializability; so serialization code will have no reason to
  202. force it to abort because of concurrent updates, making this
  203. option suitable for long-running read-only transactions.
  204. </p><p>
  205. This parameter controls the default deferrable status of each
  206. new transaction. It currently has no effect on read-write
  207. transactions or those operating at isolation levels lower
  208. than <code class="literal">serializable</code>. The default is <code class="literal">off</code>.
  209. </p><p>
  210. Consult <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> for more information.
  211. </p></dd><dt id="GUC-SESSION-REPLICATION-ROLE"><span class="term"><code class="varname">session_replication_role</code> (<code class="type">enum</code>)
  212. <a id="id-1.6.6.14.2.2.11.1.3" class="indexterm"></a>
  213. </span></dt><dd><p>
  214. Controls firing of replication-related triggers and rules for the
  215. current session. Setting this variable requires
  216. superuser privilege and results in discarding any previously cached
  217. query plans. Possible values are <code class="literal">origin</code> (the default),
  218. <code class="literal">replica</code> and <code class="literal">local</code>.
  219. </p><p>
  220. The intended use of this setting is that logical replication systems
  221. set it to <code class="literal">replica</code> when they are applying replicated
  222. changes. The effect of that will be that triggers and rules (that
  223. have not been altered from their default configuration) will not fire
  224. on the replica. See the <a class="xref" href="sql-altertable.html" title="ALTER TABLE"><span class="refentrytitle">ALTER TABLE</span></a> clauses
  225. <code class="literal">ENABLE TRIGGER</code> and <code class="literal">ENABLE RULE</code>
  226. for more information.
  227. </p><p>
  228. PostgreSQL treats the settings <code class="literal">origin</code> and
  229. <code class="literal">local</code> the same internally. Third-party replication
  230. systems may use these two values for their internal purposes, for
  231. example using <code class="literal">local</code> to designate a session whose
  232. changes should not be replicated.
  233. </p><p>
  234. Since foreign keys are implemented as triggers, setting this parameter
  235. to <code class="literal">replica</code> also disables all foreign key checks,
  236. which can leave data in an inconsistent state if improperly used.
  237. </p></dd><dt id="GUC-STATEMENT-TIMEOUT"><span class="term"><code class="varname">statement_timeout</code> (<code class="type">integer</code>)
  238. <a id="id-1.6.6.14.2.2.12.1.3" class="indexterm"></a>
  239. </span></dt><dd><p>
  240. Abort any statement that takes more than the specified amount of time.
  241. If <code class="varname">log_min_error_statement</code> is set
  242. to <code class="literal">ERROR</code> or lower, the statement that timed out
  243. will also be logged.
  244. If this value is specified without units, it is taken as milliseconds.
  245. A value of zero (the default) disables the timeout.
  246. </p><p>
  247. The timeout is measured from the time a command arrives at the
  248. server until it is completed by the server.
  249. In extended query protocol, the timeout starts running when any
  250. query-related message (Parse, Bind, Execute, Describe) arrives, and
  251. it is cancelled by completion of an Execute or Sync message.
  252. </p><p>
  253. Setting <code class="varname">statement_timeout</code> in
  254. <code class="filename">postgresql.conf</code> is not recommended because it would
  255. affect all sessions.
  256. </p></dd><dt id="GUC-LOCK-TIMEOUT"><span class="term"><code class="varname">lock_timeout</code> (<code class="type">integer</code>)
  257. <a id="id-1.6.6.14.2.2.13.1.3" class="indexterm"></a>
  258. </span></dt><dd><p>
  259. Abort any statement that waits longer than the specified amount of
  260. time while attempting to acquire a lock on a table, index,
  261. row, or other database object. The time limit applies separately to
  262. each lock acquisition attempt. The limit applies both to explicit
  263. locking requests (such as <code class="command">LOCK TABLE</code>, or <code class="command">SELECT
  264. FOR UPDATE</code> without <code class="literal">NOWAIT</code>) and to implicitly-acquired
  265. locks.
  266. If this value is specified without units, it is taken as milliseconds.
  267. A value of zero (the default) disables the timeout.
  268. </p><p>
  269. Unlike <code class="varname">statement_timeout</code>, this timeout can only occur
  270. while waiting for locks. Note that if <code class="varname">statement_timeout</code>
  271. is nonzero, it is rather pointless to set <code class="varname">lock_timeout</code> to
  272. the same or larger value, since the statement timeout would always
  273. trigger first. If <code class="varname">log_min_error_statement</code> is set to
  274. <code class="literal">ERROR</code> or lower, the statement that timed out will be
  275. logged.
  276. </p><p>
  277. Setting <code class="varname">lock_timeout</code> in
  278. <code class="filename">postgresql.conf</code> is not recommended because it would
  279. affect all sessions.
  280. </p></dd><dt id="GUC-IDLE-IN-TRANSACTION-SESSION-TIMEOUT"><span class="term"><code class="varname">idle_in_transaction_session_timeout</code> (<code class="type">integer</code>)
  281. <a id="id-1.6.6.14.2.2.14.1.3" class="indexterm"></a>
  282. </span></dt><dd><p>
  283. Terminate any session with an open transaction that has been idle for
  284. longer than the specified amount of time. This allows any
  285. locks held by that session to be released and the connection slot to be reused;
  286. it also allows tuples visible only to this transaction to be vacuumed. See
  287. <a class="xref" href="routine-vacuuming.html" title="24.1. Routine Vacuuming">Section 24.1</a> for more details about this.
  288. </p><p>
  289. If this value is specified without units, it is taken as milliseconds.
  290. A value of zero (the default) disables the timeout.
  291. </p></dd><dt id="GUC-VACUUM-FREEZE-TABLE-AGE"><span class="term"><code class="varname">vacuum_freeze_table_age</code> (<code class="type">integer</code>)
  292. <a id="id-1.6.6.14.2.2.15.1.3" class="indexterm"></a>
  293. </span></dt><dd><p>
  294. <code class="command">VACUUM</code> performs an aggressive scan if the table's
  295. <code class="structname">pg_class</code>.<code class="structfield">relfrozenxid</code> field has reached
  296. the age specified by this setting. An aggressive scan differs from
  297. a regular <code class="command">VACUUM</code> in that it visits every page that might
  298. contain unfrozen XIDs or MXIDs, not just those that might contain dead
  299. tuples. The default is 150 million transactions. Although users can
  300. set this value anywhere from zero to two billions, <code class="command">VACUUM</code>
  301. will silently limit the effective value to 95% of
  302. <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-FREEZE-MAX-AGE">autovacuum_freeze_max_age</a>, so that a
  303. periodical manual <code class="command">VACUUM</code> has a chance to run before an
  304. anti-wraparound autovacuum is launched for the table. For more
  305. information see
  306. <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-WRAPAROUND" title="24.1.5. Preventing Transaction ID Wraparound Failures">Section 24.1.5</a>.
  307. </p></dd><dt id="GUC-VACUUM-FREEZE-MIN-AGE"><span class="term"><code class="varname">vacuum_freeze_min_age</code> (<code class="type">integer</code>)
  308. <a id="id-1.6.6.14.2.2.16.1.3" class="indexterm"></a>
  309. </span></dt><dd><p>
  310. Specifies the cutoff age (in transactions) that <code class="command">VACUUM</code>
  311. should use to decide whether to freeze row versions
  312. while scanning a table.
  313. The default is 50 million transactions. Although
  314. users can set this value anywhere from zero to one billion,
  315. <code class="command">VACUUM</code> will silently limit the effective value to half
  316. the value of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-FREEZE-MAX-AGE">autovacuum_freeze_max_age</a>, so
  317. that there is not an unreasonably short time between forced
  318. autovacuums. For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-WRAPAROUND" title="24.1.5. Preventing Transaction ID Wraparound Failures">Section 24.1.5</a>.
  319. </p></dd><dt id="GUC-VACUUM-MULTIXACT-FREEZE-TABLE-AGE"><span class="term"><code class="varname">vacuum_multixact_freeze_table_age</code> (<code class="type">integer</code>)
  320. <a id="id-1.6.6.14.2.2.17.1.3" class="indexterm"></a>
  321. </span></dt><dd><p>
  322. <code class="command">VACUUM</code> performs an aggressive scan if the table's
  323. <code class="structname">pg_class</code>.<code class="structfield">relminmxid</code> field has reached
  324. the age specified by this setting. An aggressive scan differs from
  325. a regular <code class="command">VACUUM</code> in that it visits every page that might
  326. contain unfrozen XIDs or MXIDs, not just those that might contain dead
  327. tuples. The default is 150 million multixacts.
  328. Although users can set this value anywhere from zero to two billions,
  329. <code class="command">VACUUM</code> will silently limit the effective value to 95% of
  330. <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-MULTIXACT-FREEZE-MAX-AGE">autovacuum_multixact_freeze_max_age</a>, so that a
  331. periodical manual <code class="command">VACUUM</code> has a chance to run before an
  332. anti-wraparound is launched for the table.
  333. For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND" title="24.1.5.1. Multixacts and Wraparound">Section 24.1.5.1</a>.
  334. </p></dd><dt id="GUC-VACUUM-MULTIXACT-FREEZE-MIN-AGE"><span class="term"><code class="varname">vacuum_multixact_freeze_min_age</code> (<code class="type">integer</code>)
  335. <a id="id-1.6.6.14.2.2.18.1.3" class="indexterm"></a>
  336. </span></dt><dd><p>
  337. Specifies the cutoff age (in multixacts) that <code class="command">VACUUM</code>
  338. should use to decide whether to replace multixact IDs with a newer
  339. transaction ID or multixact ID while scanning a table. The default
  340. is 5 million multixacts.
  341. Although users can set this value anywhere from zero to one billion,
  342. <code class="command">VACUUM</code> will silently limit the effective value to half
  343. the value of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-MULTIXACT-FREEZE-MAX-AGE">autovacuum_multixact_freeze_max_age</a>,
  344. so that there is not an unreasonably short time between forced
  345. autovacuums.
  346. For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND" title="24.1.5.1. Multixacts and Wraparound">Section 24.1.5.1</a>.
  347. </p></dd><dt id="GUC-VACUUM-CLEANUP-INDEX-SCALE-FACTOR"><span class="term"><code class="varname">vacuum_cleanup_index_scale_factor</code> (<code class="type">floating point</code>)
  348. <a id="id-1.6.6.14.2.2.19.1.3" class="indexterm"></a>
  349. </span></dt><dd><p>
  350. Specifies the fraction of the total number of heap tuples counted in
  351. the previous statistics collection that can be inserted without
  352. incurring an index scan at the <code class="command">VACUUM</code> cleanup stage.
  353. This setting currently applies to B-tree indexes only.
  354. </p><p>
  355. If no tuples were deleted from the heap, B-tree indexes are still
  356. scanned at the <code class="command">VACUUM</code> cleanup stage when at least one
  357. of the following conditions is met: the index statistics are stale, or
  358. the index contains deleted pages that can be recycled during cleanup.
  359. Index statistics are considered to be stale if the number of newly
  360. inserted tuples exceeds the <code class="varname">vacuum_cleanup_index_scale_factor</code>
  361. fraction of the total number of heap tuples detected by the previous
  362. statistics collection. The total number of heap tuples is stored in
  363. the index meta-page. Note that the meta-page does not include this data
  364. until <code class="command">VACUUM</code> finds no dead tuples, so B-tree index
  365. scan at the cleanup stage can only be skipped if the second and
  366. subsequent <code class="command">VACUUM</code> cycles detect no dead tuples.
  367. </p><p>
  368. The value can range from <code class="literal">0</code> to
  369. <code class="literal">10000000000</code>.
  370. When <code class="varname">vacuum_cleanup_index_scale_factor</code> is set to
  371. <code class="literal">0</code>, index scans are never skipped during
  372. <code class="command">VACUUM</code> cleanup. The default value is <code class="literal">0.1</code>.
  373. </p></dd><dt id="GUC-BYTEA-OUTPUT"><span class="term"><code class="varname">bytea_output</code> (<code class="type">enum</code>)
  374. <a id="id-1.6.6.14.2.2.20.1.3" class="indexterm"></a>
  375. </span></dt><dd><p>
  376. Sets the output format for values of type <code class="type">bytea</code>.
  377. Valid values are <code class="literal">hex</code> (the default)
  378. and <code class="literal">escape</code> (the traditional PostgreSQL
  379. format). See <a class="xref" href="datatype-binary.html" title="8.4. Binary Data Types">Section 8.4</a> for more
  380. information. The <code class="type">bytea</code> type always
  381. accepts both formats on input, regardless of this setting.
  382. </p></dd><dt id="GUC-XMLBINARY"><span class="term"><code class="varname">xmlbinary</code> (<code class="type">enum</code>)
  383. <a id="id-1.6.6.14.2.2.21.1.3" class="indexterm"></a>
  384. </span></dt><dd><p>
  385. Sets how binary values are to be encoded in XML. This applies
  386. for example when <code class="type">bytea</code> values are converted to
  387. XML by the functions <code class="function">xmlelement</code> or
  388. <code class="function">xmlforest</code>. Possible values are
  389. <code class="literal">base64</code> and <code class="literal">hex</code>, which
  390. are both defined in the XML Schema standard. The default is
  391. <code class="literal">base64</code>. For further information about
  392. XML-related functions, see <a class="xref" href="functions-xml.html" title="9.14. XML Functions">Section 9.14</a>.
  393. </p><p>
  394. The actual choice here is mostly a matter of taste,
  395. constrained only by possible restrictions in client
  396. applications. Both methods support all possible values,
  397. although the hex encoding will be somewhat larger than the
  398. base64 encoding.
  399. </p></dd><dt id="GUC-XMLOPTION"><span class="term"><code class="varname">xmloption</code> (<code class="type">enum</code>)
  400. <a id="id-1.6.6.14.2.2.22.1.3" class="indexterm"></a>
  401. <a id="id-1.6.6.14.2.2.22.1.4" class="indexterm"></a>
  402. <a id="id-1.6.6.14.2.2.22.1.5" class="indexterm"></a>
  403. </span></dt><dd><p>
  404. Sets whether <code class="literal">DOCUMENT</code> or
  405. <code class="literal">CONTENT</code> is implicit when converting between
  406. XML and character string values. See <a class="xref" href="datatype-xml.html" title="8.13. XML Type">Section 8.13</a> for a description of this. Valid
  407. values are <code class="literal">DOCUMENT</code> and
  408. <code class="literal">CONTENT</code>. The default is
  409. <code class="literal">CONTENT</code>.
  410. </p><p>
  411. According to the SQL standard, the command to set this option is
  412. </p><pre class="synopsis">
  413. SET XML OPTION { DOCUMENT | CONTENT };
  414. </pre><p>
  415. This syntax is also available in PostgreSQL.
  416. </p></dd><dt id="GUC-GIN-PENDING-LIST-LIMIT"><span class="term"><code class="varname">gin_pending_list_limit</code> (<code class="type">integer</code>)
  417. <a id="id-1.6.6.14.2.2.23.1.3" class="indexterm"></a>
  418. </span></dt><dd><p>
  419. Sets the maximum size of a GIN index's pending list, which is used
  420. when <code class="literal">fastupdate</code> is enabled. If the list grows
  421. larger than this maximum size, it is cleaned up by moving
  422. the entries in it to the index's main GIN data structure in bulk.
  423. If this value is specified without units, it is taken as kilobytes.
  424. The default is four megabytes (<code class="literal">4MB</code>). This setting
  425. can be overridden for individual GIN indexes by changing
  426. index storage parameters.
  427. See <a class="xref" href="gin-implementation.html#GIN-FAST-UPDATE" title="66.4.1. GIN Fast Update Technique">Section 66.4.1</a> and <a class="xref" href="gin-tips.html" title="66.5. GIN Tips and Tricks">Section 66.5</a>
  428. for more information.
  429. </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-FORMAT"><div class="titlepage"><div><div><h3 class="title">19.11.2. Locale and Formatting</h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt id="GUC-DATESTYLE"><span class="term"><code class="varname">DateStyle</code> (<code class="type">string</code>)
  430. <a id="id-1.6.6.14.3.2.1.1.3" class="indexterm"></a>
  431. </span></dt><dd><p>
  432. Sets the display format for date and time values, as well as the
  433. rules for interpreting ambiguous date input values. For
  434. historical reasons, this variable contains two independent
  435. components: the output format specification (<code class="literal">ISO</code>,
  436. <code class="literal">Postgres</code>, <code class="literal">SQL</code>, or <code class="literal">German</code>)
  437. and the input/output specification for year/month/day ordering
  438. (<code class="literal">DMY</code>, <code class="literal">MDY</code>, or <code class="literal">YMD</code>). These
  439. can be set separately or together. The keywords <code class="literal">Euro</code>
  440. and <code class="literal">European</code> are synonyms for <code class="literal">DMY</code>; the
  441. keywords <code class="literal">US</code>, <code class="literal">NonEuro</code>, and
  442. <code class="literal">NonEuropean</code> are synonyms for <code class="literal">MDY</code>. See
  443. <a class="xref" href="datatype-datetime.html" title="8.5. Date/Time Types">Section 8.5</a> for more information. The
  444. built-in default is <code class="literal">ISO, MDY</code>, but
  445. <span class="application">initdb</span> will initialize the
  446. configuration file with a setting that corresponds to the
  447. behavior of the chosen <code class="varname">lc_time</code> locale.
  448. </p></dd><dt id="GUC-INTERVALSTYLE"><span class="term"><code class="varname">IntervalStyle</code> (<code class="type">enum</code>)
  449. <a id="id-1.6.6.14.3.2.2.1.3" class="indexterm"></a>
  450. </span></dt><dd><p>
  451. Sets the display format for interval values.
  452. The value <code class="literal">sql_standard</code> will produce
  453. output matching <acronym class="acronym">SQL</acronym> standard interval literals.
  454. The value <code class="literal">postgres</code> (which is the default) will produce
  455. output matching <span class="productname">PostgreSQL</span> releases prior to 8.4
  456. when the <a class="xref" href="runtime-config-client.html#GUC-DATESTYLE">DateStyle</a>
  457. parameter was set to <code class="literal">ISO</code>.
  458. The value <code class="literal">postgres_verbose</code> will produce output
  459. matching <span class="productname">PostgreSQL</span> releases prior to 8.4
  460. when the <code class="varname">DateStyle</code>
  461. parameter was set to non-<code class="literal">ISO</code> output.
  462. The value <code class="literal">iso_8601</code> will produce output matching the time
  463. interval <span class="quote">“<span class="quote">format with designators</span>”</span> defined in section
  464. 4.4.3.2 of ISO 8601.
  465. </p><p>
  466. The <code class="varname">IntervalStyle</code> parameter also affects the
  467. interpretation of ambiguous interval input. See
  468. <a class="xref" href="datatype-datetime.html#DATATYPE-INTERVAL-INPUT" title="8.5.4. Interval Input">Section 8.5.4</a> for more information.
  469. </p></dd><dt id="GUC-TIMEZONE"><span class="term"><code class="varname">TimeZone</code> (<code class="type">string</code>)
  470. <a id="id-1.6.6.14.3.2.3.1.3" class="indexterm"></a>
  471. <a id="id-1.6.6.14.3.2.3.1.4" class="indexterm"></a>
  472. </span></dt><dd><p>
  473. Sets the time zone for displaying and interpreting time stamps.
  474. The built-in default is <code class="literal">GMT</code>, but that is typically
  475. overridden in <code class="filename">postgresql.conf</code>; <span class="application">initdb</span>
  476. will install a setting there corresponding to its system environment.
  477. See <a class="xref" href="datatype-datetime.html#DATATYPE-TIMEZONES" title="8.5.3. Time Zones">Section 8.5.3</a> for more information.
  478. </p></dd><dt id="GUC-TIMEZONE-ABBREVIATIONS"><span class="term"><code class="varname">timezone_abbreviations</code> (<code class="type">string</code>)
  479. <a id="id-1.6.6.14.3.2.4.1.3" class="indexterm"></a>
  480. <a id="id-1.6.6.14.3.2.4.1.4" class="indexterm"></a>
  481. </span></dt><dd><p>
  482. Sets the collection of time zone abbreviations that will be accepted
  483. by the server for datetime input. The default is <code class="literal">'Default'</code>,
  484. which is a collection that works in most of the world; there are
  485. also <code class="literal">'Australia'</code> and <code class="literal">'India'</code>,
  486. and other collections can be defined for a particular installation.
  487. See <a class="xref" href="datetime-config-files.html" title="B.4. Date/Time Configuration Files">Section B.4</a> for more information.
  488. </p></dd><dt id="GUC-EXTRA-FLOAT-DIGITS"><span class="term"><code class="varname">extra_float_digits</code> (<code class="type">integer</code>)
  489. <a id="id-1.6.6.14.3.2.5.1.3" class="indexterm"></a>
  490. <a id="id-1.6.6.14.3.2.5.1.4" class="indexterm"></a>
  491. <a id="id-1.6.6.14.3.2.5.1.5" class="indexterm"></a>
  492. </span></dt><dd><p>
  493. This parameter adjusts the number of digits used for textual output of
  494. floating-point values, including <code class="type">float4</code>, <code class="type">float8</code>,
  495. and geometric data types.
  496. </p><p>
  497. If the value is 1 (the default) or above, float values are output in
  498. shortest-precise format; see <a class="xref" href="datatype-numeric.html#DATATYPE-FLOAT" title="8.1.3. Floating-Point Types">Section 8.1.3</a>. The
  499. actual number of digits generated depends only on the value being
  500. output, not on the value of this parameter. At most 17 digits are
  501. required for <code class="type">float8</code> values, and 9 for <code class="type">float4</code>
  502. values. This format is both fast and precise, preserving the original
  503. binary float value exactly when correctly read. For historical
  504. compatibility, values up to 3 are permitted.
  505. </p><p>
  506. If the value is zero or negative, then the output is rounded to a
  507. given decimal precision. The precision used is the standard number of
  508. digits for the type (<code class="literal">FLT_DIG</code>
  509. or <code class="literal">DBL_DIG</code> as appropriate) reduced according to the
  510. value of this parameter. (For example, specifying -1 will cause
  511. <code class="type">float4</code> values to be output rounded to 5 significant
  512. digits, and <code class="type">float8</code> values
  513. rounded to 14 digits.) This format is slower and does not preserve all
  514. the bits of the binary float value, but may be more human-readable.
  515. </p><div class="note"><h3 class="title">Note</h3><p>
  516. The meaning of this parameter, and its default value, changed
  517. in <span class="productname">PostgreSQL</span> 12;
  518. see <a class="xref" href="datatype-numeric.html#DATATYPE-FLOAT" title="8.1.3. Floating-Point Types">Section 8.1.3</a> for further discussion.
  519. </p></div></dd><dt id="GUC-CLIENT-ENCODING"><span class="term"><code class="varname">client_encoding</code> (<code class="type">string</code>)
  520. <a id="id-1.6.6.14.3.2.6.1.3" class="indexterm"></a>
  521. <a id="id-1.6.6.14.3.2.6.1.4" class="indexterm"></a>
  522. </span></dt><dd><p>
  523. Sets the client-side encoding (character set).
  524. The default is to use the database encoding.
  525. The character sets supported by the <span class="productname">PostgreSQL</span>
  526. server are described in <a class="xref" href="multibyte.html#MULTIBYTE-CHARSET-SUPPORTED" title="23.3.1. Supported Character Sets">Section 23.3.1</a>.
  527. </p></dd><dt id="GUC-LC-MESSAGES"><span class="term"><code class="varname">lc_messages</code> (<code class="type">string</code>)
  528. <a id="id-1.6.6.14.3.2.7.1.3" class="indexterm"></a>
  529. </span></dt><dd><p>
  530. Sets the language in which messages are displayed. Acceptable
  531. values are system-dependent; see <a class="xref" href="locale.html" title="23.1. Locale Support">Section 23.1</a> for
  532. more information. If this variable is set to the empty string
  533. (which is the default) then the value is inherited from the
  534. execution environment of the server in a system-dependent way.
  535. </p><p>
  536. On some systems, this locale category does not exist. Setting
  537. this variable will still work, but there will be no effect.
  538. Also, there is a chance that no translated messages for the
  539. desired language exist. In that case you will continue to see
  540. the English messages.
  541. </p><p>
  542. Only superusers can change this setting, because it affects the
  543. messages sent to the server log as well as to the client, and
  544. an improper value might obscure the readability of the server
  545. logs.
  546. </p></dd><dt id="GUC-LC-MONETARY"><span class="term"><code class="varname">lc_monetary</code> (<code class="type">string</code>)
  547. <a id="id-1.6.6.14.3.2.8.1.3" class="indexterm"></a>
  548. </span></dt><dd><p>
  549. Sets the locale to use for formatting monetary amounts, for
  550. example with the <code class="function">to_char</code> family of
  551. functions. Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="23.1. Locale Support">Section 23.1</a> for more information. If this variable is
  552. set to the empty string (which is the default) then the value
  553. is inherited from the execution environment of the server in a
  554. system-dependent way.
  555. </p></dd><dt id="GUC-LC-NUMERIC"><span class="term"><code class="varname">lc_numeric</code> (<code class="type">string</code>)
  556. <a id="id-1.6.6.14.3.2.9.1.3" class="indexterm"></a>
  557. </span></dt><dd><p>
  558. Sets the locale to use for formatting numbers, for example
  559. with the <code class="function">to_char</code> family of
  560. functions. Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="23.1. Locale Support">Section 23.1</a> for more information. If this variable is
  561. set to the empty string (which is the default) then the value
  562. is inherited from the execution environment of the server in a
  563. system-dependent way.
  564. </p></dd><dt id="GUC-LC-TIME"><span class="term"><code class="varname">lc_time</code> (<code class="type">string</code>)
  565. <a id="id-1.6.6.14.3.2.10.1.3" class="indexterm"></a>
  566. </span></dt><dd><p>
  567. Sets the locale to use for formatting dates and times, for example
  568. with the <code class="function">to_char</code> family of
  569. functions. Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="23.1. Locale Support">Section 23.1</a> for more information. If this variable is
  570. set to the empty string (which is the default) then the value
  571. is inherited from the execution environment of the server in a
  572. system-dependent way.
  573. </p></dd><dt id="GUC-DEFAULT-TEXT-SEARCH-CONFIG"><span class="term"><code class="varname">default_text_search_config</code> (<code class="type">string</code>)
  574. <a id="id-1.6.6.14.3.2.11.1.3" class="indexterm"></a>
  575. </span></dt><dd><p>
  576. Selects the text search configuration that is used by those variants
  577. of the text search functions that do not have an explicit argument
  578. specifying the configuration.
  579. See <a class="xref" href="textsearch.html" title="Chapter 12. Full Text Search">Chapter 12</a> for further information.
  580. The built-in default is <code class="literal">pg_catalog.simple</code>, but
  581. <span class="application">initdb</span> will initialize the
  582. configuration file with a setting that corresponds to the
  583. chosen <code class="varname">lc_ctype</code> locale, if a configuration
  584. matching that locale can be identified.
  585. </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-PRELOAD"><div class="titlepage"><div><div><h3 class="title">19.11.3. Shared Library Preloading</h3></div></div></div><p>
  586. Several settings are available for preloading shared libraries into the
  587. server, in order to load additional functionality or achieve performance
  588. benefits. For example, a setting of
  589. <code class="literal">'$libdir/mylib'</code> would cause
  590. <code class="literal">mylib.so</code> (or on some platforms,
  591. <code class="literal">mylib.sl</code>) to be preloaded from the installation's standard
  592. library directory. The differences between the settings are when they
  593. take effect and what privileges are required to change them.
  594. </p><p>
  595. <span class="productname">PostgreSQL</span> procedural language libraries can
  596. be preloaded in this way, typically by using the
  597. syntax <code class="literal">'$libdir/plXXX'</code> where
  598. <code class="literal">XXX</code> is <code class="literal">pgsql</code>, <code class="literal">perl</code>,
  599. <code class="literal">tcl</code>, or <code class="literal">python</code>.
  600. </p><p>
  601. Only shared libraries specifically intended to be used with PostgreSQL
  602. can be loaded this way. Every PostgreSQL-supported library has
  603. a <span class="quote">“<span class="quote">magic block</span>”</span> that is checked to guarantee compatibility. For
  604. this reason, non-PostgreSQL libraries cannot be loaded in this way. You
  605. might be able to use operating-system facilities such
  606. as <code class="envar">LD_PRELOAD</code> for that.
  607. </p><p>
  608. In general, refer to the documentation of a specific module for the
  609. recommended way to load that module.
  610. </p><div class="variablelist"><dl class="variablelist"><dt id="GUC-LOCAL-PRELOAD-LIBRARIES"><span class="term"><code class="varname">local_preload_libraries</code> (<code class="type">string</code>)
  611. <a id="id-1.6.6.14.4.6.1.1.3" class="indexterm"></a>
  612. <a id="id-1.6.6.14.4.6.1.1.4" class="indexterm"></a>
  613. </span></dt><dd><p>
  614. This variable specifies one or more shared libraries that are to be
  615. preloaded at connection start.
  616. It contains a comma-separated list of library names, where each name
  617. is interpreted as for the <a class="xref" href="sql-load.html" title="LOAD"><span class="refentrytitle">LOAD</span></a> command.
  618. Whitespace between entries is ignored; surround a library name with
  619. double quotes if you need to include whitespace or commas in the name.
  620. The parameter value only takes effect at the start of the connection.
  621. Subsequent changes have no effect. If a specified library is not
  622. found, the connection attempt will fail.
  623. </p><p>
  624. This option can be set by any user. Because of that, the libraries
  625. that can be loaded are restricted to those appearing in the
  626. <code class="filename">plugins</code> subdirectory of the installation's
  627. standard library directory. (It is the database administrator's
  628. responsibility to ensure that only <span class="quote">“<span class="quote">safe</span>”</span> libraries
  629. are installed there.) Entries in <code class="varname">local_preload_libraries</code>
  630. can specify this directory explicitly, for example
  631. <code class="literal">$libdir/plugins/mylib</code>, or just specify
  632. the library name — <code class="literal">mylib</code> would have
  633. the same effect as <code class="literal">$libdir/plugins/mylib</code>.
  634. </p><p>
  635. The intent of this feature is to allow unprivileged users to load
  636. debugging or performance-measurement libraries into specific sessions
  637. without requiring an explicit <code class="command">LOAD</code> command. To that end,
  638. it would be typical to set this parameter using
  639. the <code class="envar">PGOPTIONS</code> environment variable on the client or by
  640. using
  641. <code class="command">ALTER ROLE SET</code>.
  642. </p><p>
  643. However, unless a module is specifically designed to be used in this way by
  644. non-superusers, this is usually not the right setting to use. Look
  645. at <a class="xref" href="runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a> instead.
  646. </p></dd><dt id="GUC-SESSION-PRELOAD-LIBRARIES"><span class="term"><code class="varname">session_preload_libraries</code> (<code class="type">string</code>)
  647. <a id="id-1.6.6.14.4.6.2.1.3" class="indexterm"></a>
  648. </span></dt><dd><p>
  649. This variable specifies one or more shared libraries that are to be
  650. preloaded at connection start.
  651. It contains a comma-separated list of library names, where each name
  652. is interpreted as for the <a class="xref" href="sql-load.html" title="LOAD"><span class="refentrytitle">LOAD</span></a> command.
  653. Whitespace between entries is ignored; surround a library name with
  654. double quotes if you need to include whitespace or commas in the name.
  655. The parameter value only takes effect at the start of the connection.
  656. Subsequent changes have no effect. If a specified library is not
  657. found, the connection attempt will fail.
  658. Only superusers can change this setting.
  659. </p><p>
  660. The intent of this feature is to allow debugging or
  661. performance-measurement libraries to be loaded into specific sessions
  662. without an explicit
  663. <code class="command">LOAD</code> command being given. For
  664. example, <a class="xref" href="auto-explain.html" title="F.4. auto_explain">auto_explain</a> could be enabled for all
  665. sessions under a given user name by setting this parameter
  666. with <code class="command">ALTER ROLE SET</code>. Also, this parameter can be changed
  667. without restarting the server (but changes only take effect when a new
  668. session is started), so it is easier to add new modules this way, even
  669. if they should apply to all sessions.
  670. </p><p>
  671. Unlike <a class="xref" href="runtime-config-client.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a>, there is no large
  672. performance advantage to loading a library at session start rather than
  673. when it is first used. There is some advantage, however, when
  674. connection pooling is used.
  675. </p></dd><dt id="GUC-SHARED-PRELOAD-LIBRARIES"><span class="term"><code class="varname">shared_preload_libraries</code> (<code class="type">string</code>)
  676. <a id="id-1.6.6.14.4.6.3.1.3" class="indexterm"></a>
  677. </span></dt><dd><p>
  678. This variable specifies one or more shared libraries to be preloaded at
  679. server start.
  680. It contains a comma-separated list of library names, where each name
  681. is interpreted as for the <a class="xref" href="sql-load.html" title="LOAD"><span class="refentrytitle">LOAD</span></a> command.
  682. Whitespace between entries is ignored; surround a library name with
  683. double quotes if you need to include whitespace or commas in the name.
  684. This parameter can only be set at server start. If a specified
  685. library is not found, the server will fail to start.
  686. </p><p>
  687. Some libraries need to perform certain operations that can only take
  688. place at postmaster start, such as allocating shared memory, reserving
  689. light-weight locks, or starting background workers. Those libraries
  690. must be loaded at server start through this parameter. See the
  691. documentation of each library for details.
  692. </p><p>
  693. Other libraries can also be preloaded. By preloading a shared library,
  694. the library startup time is avoided when the library is first used.
  695. However, the time to start each new server process might increase
  696. slightly, even if that process never uses the library. So this
  697. parameter is recommended only for libraries that will be used in most
  698. sessions. Also, changing this parameter requires a server restart, so
  699. this is not the right setting to use for short-term debugging tasks,
  700. say. Use <a class="xref" href="runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a> for that
  701. instead.
  702. </p><div class="note"><h3 class="title">Note</h3><p>
  703. On Windows hosts, preloading a library at server start will not reduce
  704. the time required to start each new server process; each server process
  705. will re-load all preload libraries. However, <code class="varname">shared_preload_libraries
  706. </code> is still useful on Windows hosts for libraries that need to
  707. perform operations at postmaster start time.
  708. </p></div></dd><dt id="GUC-JIT-PROVIDER"><span class="term"><code class="varname">jit_provider</code> (<code class="type">string</code>)
  709. <a id="id-1.6.6.14.4.6.4.1.3" class="indexterm"></a>
  710. </span></dt><dd><p>
  711. This variable is the name of the JIT provider library to be used
  712. (see <a class="xref" href="jit-extensibility.html#JIT-PLUGGABLE" title="31.4.2. Pluggable JIT Providers">Section 31.4.2</a>).
  713. The default is <code class="literal">llvmjit</code>.
  714. This parameter can only be set at server start.
  715. </p><p>
  716. If set to a non-existent library, <acronym class="acronym">JIT</acronym> will not be
  717. available, but no error will be raised. This allows JIT support to be
  718. installed separately from the main
  719. <span class="productname">PostgreSQL</span> package.
  720. </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-OTHER"><div class="titlepage"><div><div><h3 class="title">19.11.4. Other Defaults</h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt id="GUC-DYNAMIC-LIBRARY-PATH"><span class="term"><code class="varname">dynamic_library_path</code> (<code class="type">string</code>)
  721. <a id="id-1.6.6.14.5.2.1.1.3" class="indexterm"></a>
  722. <a id="id-1.6.6.14.5.2.1.1.4" class="indexterm"></a>
  723. </span></dt><dd><p>
  724. If a dynamically loadable module needs to be opened and the
  725. file name specified in the <code class="command">CREATE FUNCTION</code> or
  726. <code class="command">LOAD</code> command
  727. does not have a directory component (i.e., the
  728. name does not contain a slash), the system will search this
  729. path for the required file.
  730. </p><p>
  731. The value for <code class="varname">dynamic_library_path</code> must be a
  732. list of absolute directory paths separated by colons (or semi-colons
  733. on Windows). If a list element starts
  734. with the special string <code class="literal">$libdir</code>, the
  735. compiled-in <span class="productname">PostgreSQL</span> package
  736. library directory is substituted for <code class="literal">$libdir</code>; this
  737. is where the modules provided by the standard
  738. <span class="productname">PostgreSQL</span> distribution are installed.
  739. (Use <code class="literal">pg_config --pkglibdir</code> to find out the name of
  740. this directory.) For example:
  741. </p><pre class="programlisting">
  742. dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
  743. </pre><p>
  744. or, in a Windows environment:
  745. </p><pre class="programlisting">
  746. dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
  747. </pre><p>
  748. </p><p>
  749. The default value for this parameter is
  750. <code class="literal">'$libdir'</code>. If the value is set to an empty
  751. string, the automatic path search is turned off.
  752. </p><p>
  753. This parameter can be changed at run time by superusers, but a
  754. setting done that way will only persist until the end of the
  755. client connection, so this method should be reserved for
  756. development purposes. The recommended way to set this parameter
  757. is in the <code class="filename">postgresql.conf</code> configuration
  758. file.
  759. </p></dd><dt id="GUC-GIN-FUZZY-SEARCH-LIMIT"><span class="term"><code class="varname">gin_fuzzy_search_limit</code> (<code class="type">integer</code>)
  760. <a id="id-1.6.6.14.5.2.2.1.3" class="indexterm"></a>
  761. </span></dt><dd><p>
  762. Soft upper limit of the size of the set returned by GIN index scans. For more
  763. information see <a class="xref" href="gin-tips.html" title="66.5. GIN Tips and Tricks">Section 66.5</a>.
  764. </p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="runtime-config-autovacuum.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="runtime-config.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="runtime-config-locks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.10. Automatic Vacuuming </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 19.12. Lock Management</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1