Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
runtime-config-client.html896 linesDownload Raw Back to html
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>20.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 Vsnapshot" /><link rel="prev" href="runtime-config-autovacuum.html" title="20.10. Automatic Vacuuming" /><link rel="next" href="runtime-config-locks.html" title="20.12. Lock Management" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">20.11. Client Connection Defaults</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="runtime-config-autovacuum.html" title="20.10. Automatic Vacuuming">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="runtime-config.html" title="Chapter 20. Server Configuration">Up</a></td><th width="60%" align="center">Chapter 20. Server Configuration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="runtime-config-locks.html" title="20.12. Lock Management">Next</a></td></tr></table><hr /></div><div class="sect1" id="RUNTIME-CONFIG-CLIENT"><div class="titlepage"><div><div><h2 class="title" style="clear: both">20.11. Client Connection Defaults <a href="#RUNTIME-CONFIG-CLIENT" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT">20.11.1. Statement Behavior</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT">20.11.2. Locale and Formatting</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-PRELOAD">20.11.3. Shared Library Preloading</a></span></dt><dt><span class="sect2"><a href="runtime-config-client.html#RUNTIME-CONFIG-CLIENT-OTHER">20.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">20.11.1. Statement Behavior <a href="#RUNTIME-CONFIG-CLIENT-STATEMENT" class="id_link">#</a></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.7.14.2.2.1.1.3" class="indexterm"></a>4      </span> <a href="#GUC-CLIENT-MIN-MESSAGES" class="id_link">#</a></dt><dd><p>5        Controls which6        <a class="link" href="runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS" title="Table 20.2. 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 is14        <code class="literal">NOTICE</code>.  Note that <code class="literal">LOG</code> has a different15        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.7.14.2.2.2.1.3" class="indexterm"></a>20      <a id="id-1.6.7.14.2.2.2.1.4" class="indexterm"></a>21      </span> <a href="#GUC-SEARCH-PATH" class="id_link">#</a></dt><dd><p>22        This variable specifies the order in which schemas are searched23        when an object (table, data type, function, etc.) is referenced by a24        simple name with no schema specified.  When there are objects of25        identical names in different schemas, the one found first26        in the search path is used.  An object that is not in any of the27        schemas in the search path can only be referenced by specifying28        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-separated31        list of schema names.  Any name that is not an existing schema, or is32        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 name36        <code class="literal">$user</code>, then the schema having the name returned by37        <code class="function">CURRENT_USER</code> is substituted, if there is such a schema38        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 always42        searched, whether it is mentioned in the path or not.  If it is43        mentioned in the path then it will be searched in the specified44        order.  If <code class="literal">pg_catalog</code> is not in the path then it will45        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 it49        exists.  It can be explicitly listed in the path by using the50        alias <code class="literal">pg_temp</code><a id="id-1.6.7.14.2.2.2.2.5.3" class="indexterm"></a>.  If it is not listed in the path then51        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 for54        function or operator names.55       </p><p>56        When objects are created without specifying a particular target57        schema, they will be placed in the first valid schema named in58        <code class="varname">search_path</code>.  An error is reported if the search59        path is empty.60       </p><p>61        The default value for this parameter is62        <code class="literal">"$user", public</code>.63        This setting supports shared use of a database (where no users64        have private schemas, and all share use of <code class="literal">public</code>),65        private per-user schemas, and combinations of these.  Other66        effects can be obtained by altering the default search path67        setting, either globally or per-user.68       </p><p>69        For more information on schema handling, see70        <a class="xref" href="ddl-schemas.html" title="5.9. Schemas">Section 5.9</a>.  In particular, the default71        configuration is suitable only when the database has a single user or72        a few mutually-trusting users.73       </p><p>74        The current effective value of the search path can be examined75        via the <acronym class="acronym">SQL</acronym> function76        <code class="function">current_schemas</code>77        (see <a class="xref" href="functions-info.html" title="9.26. System Information Functions and Operators">Section 9.26</a>).78        This is not quite the same as79        examining the value of <code class="varname">search_path</code>, since80        <code class="function">current_schemas</code> shows how the items81        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.7.14.2.2.3.1.3" class="indexterm"></a>84      </span> <a href="#GUC-ROW-SECURITY" class="id_link">#</a></dt><dd><p>85        This variable controls whether to raise an error in lieu of applying a86        row security policy.  When set to <code class="literal">on</code>, policies apply87        normally.  When set to <code class="literal">off</code>, queries fail which would88        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 cause90        incorrect results; for example, <span class="application">pg_dump</span> makes that91        change by default.  This variable has no effect on roles which bypass92        every row security policy, to wit, superusers and roles with93        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.7.14.2.2.4.1.3" class="indexterm"></a>99      </span> <a href="#GUC-DEFAULT-TABLE-ACCESS-METHOD" class="id_link">#</a></dt><dd><p>100        This parameter specifies the default table access method to use when101        creating tables or materialized views if the <code class="command">CREATE</code>102        command does not explicitly specify an access method, or when103        <code class="command">SELECT ... INTO</code> is used, which does not allow104        specifying 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.7.14.2.2.5.1.3" class="indexterm"></a>107      <a id="id-1.6.7.14.2.2.5.1.4" class="indexterm"></a>108      </span> <a href="#GUC-DEFAULT-TABLESPACE" class="id_link">#</a></dt><dd><p>109        This variable specifies the default tablespace in which to create110        objects (tables and indexes) when a <code class="command">CREATE</code> command does111        not explicitly specify a tablespace.112       </p><p>113        The value is either the name of a tablespace, or an empty string114        to specify using the default tablespace of the current database.115        If the value does not match the name of any existing tablespace,116        <span class="productname">PostgreSQL</span> will automatically use the default117        tablespace of the current database.  If a nondefault tablespace118        is specified, the user must have <code class="literal">CREATE</code> privilege119        for it, or creation attempts will fail.120       </p><p>121        This variable is not used for temporary tables; for them,122        <a class="xref" href="runtime-config-client.html#GUC-TEMP-TABLESPACES">temp_tablespaces</a> is consulted instead.123       </p><p>124        This variable is also not used when creating databases.125        By default, a new database inherits its tablespace setting from126        the template database it is copied from.127       </p><p>128        If this parameter is set to a value other than the empty string129        when a partitioned table is created, the partitioned table's130        tablespace will be set to that value, which will be used as131        the default tablespace for partitions created in the future,132        even if <code class="varname">default_tablespace</code> has changed since then.133       </p><p>134        For more information on tablespaces,135        see <a class="xref" href="manage-ag-tablespaces.html" title="23.6. Tablespaces">Section 23.6</a>.136       </p></dd><dt id="GUC-DEFAULT-TOAST-COMPRESSION"><span class="term"><code class="varname">default_toast_compression</code> (<code class="type">enum</code>)137      <a id="id-1.6.7.14.2.2.6.1.3" class="indexterm"></a>138      </span> <a href="#GUC-DEFAULT-TOAST-COMPRESSION" class="id_link">#</a></dt><dd><p>139        This variable sets the default140        <a class="link" href="storage-toast.html" title="73.2. TOAST">TOAST</a>141        compression method for values of compressible columns.142        (This can be overridden for individual columns by setting143        the <code class="literal">COMPRESSION</code> column option in144        <code class="command">CREATE TABLE</code> or145        <code class="command">ALTER TABLE</code>.)146        The supported compression methods are <code class="literal">pglz</code> and147        (if <span class="productname">PostgreSQL</span> was compiled with148        <code class="option">--with-lz4</code>) <code class="literal">lz4</code>.149        The default is <code class="literal">pglz</code>.150       </p></dd><dt id="GUC-TEMP-TABLESPACES"><span class="term"><code class="varname">temp_tablespaces</code> (<code class="type">string</code>)151      <a id="id-1.6.7.14.2.2.7.1.3" class="indexterm"></a>152      <a id="id-1.6.7.14.2.2.7.1.4" class="indexterm"></a>153      </span> <a href="#GUC-TEMP-TABLESPACES" class="id_link">#</a></dt><dd><p>154        This variable specifies tablespaces in which to create temporary155        objects (temp tables and indexes on temp tables) when a156        <code class="command">CREATE</code> command does not explicitly specify a tablespace.157        Temporary files for purposes such as sorting large data sets158        are also created in these tablespaces.159       </p><p>160        The value is a list of names of tablespaces.  When there is more than161        one name in the list, <span class="productname">PostgreSQL</span> chooses a random162        member of the list each time a temporary object is to be created;163        except that within a transaction, successively created temporary164        objects are placed in successive tablespaces from the list.165        If the selected element of the list is an empty string,166        <span class="productname">PostgreSQL</span> will automatically use the default167        tablespace of the current database instead.168       </p><p>169        When <code class="varname">temp_tablespaces</code> is set interactively, specifying a170        nonexistent tablespace is an error, as is specifying a tablespace for171        which the user does not have <code class="literal">CREATE</code> privilege.  However,172        when using a previously set value, nonexistent tablespaces are173        ignored, as are tablespaces for which the user lacks174        <code class="literal">CREATE</code> privilege.  In particular, this rule applies when175        using a value set in <code class="filename">postgresql.conf</code>.176       </p><p>177        The default value is an empty string, which results in all temporary178        objects being created in the default tablespace of the current179        database.180       </p><p>181        See also <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TABLESPACE">default_tablespace</a>.182       </p></dd><dt id="GUC-CHECK-FUNCTION-BODIES"><span class="term"><code class="varname">check_function_bodies</code> (<code class="type">boolean</code>)183      <a id="id-1.6.7.14.2.2.8.1.3" class="indexterm"></a>184      </span> <a href="#GUC-CHECK-FUNCTION-BODIES" class="id_link">#</a></dt><dd><p>185        This parameter is normally on. When set to <code class="literal">off</code>, it186        disables validation of the routine body string during <a class="xref" href="sql-createfunction.html" title="CREATE FUNCTION"><span class="refentrytitle">CREATE FUNCTION</span></a> and <a class="xref" href="sql-createprocedure.html" title="CREATE PROCEDURE"><span class="refentrytitle">CREATE PROCEDURE</span></a>.  Disabling validation avoids side187        effects of the validation process, in particular preventing false188        positives due to problems such as forward references.189        Set this parameter190        to <code class="literal">off</code> before loading functions on behalf of other191        users; <span class="application">pg_dump</span> does so automatically.192       </p></dd><dt id="GUC-DEFAULT-TRANSACTION-ISOLATION"><span class="term"><code class="varname">default_transaction_isolation</code> (<code class="type">enum</code>)193      <a id="id-1.6.7.14.2.2.9.1.3" class="indexterm"></a>194      <a id="id-1.6.7.14.2.2.9.1.4" class="indexterm"></a>195      </span> <a href="#GUC-DEFAULT-TRANSACTION-ISOLATION" class="id_link">#</a></dt><dd><p>196        Each SQL transaction has an isolation level, which can be197        either <span class="quote">“<span class="quote">read uncommitted</span>”</span>, <span class="quote">“<span class="quote">read198        committed</span>”</span>, <span class="quote">“<span class="quote">repeatable read</span>”</span>, or199        <span class="quote">“<span class="quote">serializable</span>”</span>.  This parameter controls the200        default isolation level of each new transaction. The default201        is <span class="quote">“<span class="quote">read committed</span>”</span>.202       </p><p>203        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.204       </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>)205      <a id="id-1.6.7.14.2.2.10.1.3" class="indexterm"></a>206      <a id="id-1.6.7.14.2.2.10.1.4" class="indexterm"></a>207      </span> <a href="#GUC-DEFAULT-TRANSACTION-READ-ONLY" class="id_link">#</a></dt><dd><p>208        A read-only SQL transaction cannot alter non-temporary tables.209        This parameter controls the default read-only status of each new210        transaction. The default is <code class="literal">off</code> (read/write).211       </p><p>212        Consult <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> for more information.213       </p></dd><dt id="GUC-DEFAULT-TRANSACTION-DEFERRABLE"><span class="term"><code class="varname">default_transaction_deferrable</code> (<code class="type">boolean</code>)214      <a id="id-1.6.7.14.2.2.11.1.3" class="indexterm"></a>215      <a id="id-1.6.7.14.2.2.11.1.4" class="indexterm"></a>216      </span> <a href="#GUC-DEFAULT-TRANSACTION-DEFERRABLE" class="id_link">#</a></dt><dd><p>217        When running at the <code class="literal">serializable</code> isolation level,218        a deferrable read-only SQL transaction may be delayed before219        it is allowed to proceed.  However, once it begins executing220        it does not incur any of the overhead required to ensure221        serializability; so serialization code will have no reason to222        force it to abort because of concurrent updates, making this223        option suitable for long-running read-only transactions.224        </p><p>225        This parameter controls the default deferrable status of each226        new transaction.  It currently has no effect on read-write227        transactions or those operating at isolation levels lower228        than <code class="literal">serializable</code>. The default is <code class="literal">off</code>.229       </p><p>230        Consult <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> for more information.231       </p></dd><dt id="GUC-TRANSACTION-ISOLATION"><span class="term"><code class="varname">transaction_isolation</code> (<code class="type">enum</code>)232      <a id="id-1.6.7.14.2.2.12.1.3" class="indexterm"></a>233      <a id="id-1.6.7.14.2.2.12.1.4" class="indexterm"></a>234      </span> <a href="#GUC-TRANSACTION-ISOLATION" class="id_link">#</a></dt><dd><p>235        This parameter reflects the current transaction's isolation level.236        At the beginning of each transaction, it is set to the current value237        of <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TRANSACTION-ISOLATION">default_transaction_isolation</a>.238        Any subsequent attempt to change it is equivalent to a <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> command.239       </p></dd><dt id="GUC-TRANSACTION-READ-ONLY"><span class="term"><code class="varname">transaction_read_only</code> (<code class="type">boolean</code>)240      <a id="id-1.6.7.14.2.2.13.1.3" class="indexterm"></a>241      <a id="id-1.6.7.14.2.2.13.1.4" class="indexterm"></a>242      </span> <a href="#GUC-TRANSACTION-READ-ONLY" class="id_link">#</a></dt><dd><p>243        This parameter reflects the current transaction's read-only status.244        At the beginning of each transaction, it is set to the current value245        of <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY">default_transaction_read_only</a>.246        Any subsequent attempt to change it is equivalent to a <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> command.247       </p></dd><dt id="GUC-TRANSACTION-DEFERRABLE"><span class="term"><code class="varname">transaction_deferrable</code> (<code class="type">boolean</code>)248      <a id="id-1.6.7.14.2.2.14.1.3" class="indexterm"></a>249      <a id="id-1.6.7.14.2.2.14.1.4" class="indexterm"></a>250      </span> <a href="#GUC-TRANSACTION-DEFERRABLE" class="id_link">#</a></dt><dd><p>251        This parameter reflects the current transaction's deferrability status.252        At the beginning of each transaction, it is set to the current value253        of <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE">default_transaction_deferrable</a>.254        Any subsequent attempt to change it is equivalent to a <a class="xref" href="sql-set-transaction.html" title="SET TRANSACTION"><span class="refentrytitle">SET TRANSACTION</span></a> command.255       </p></dd><dt id="GUC-SESSION-REPLICATION-ROLE"><span class="term"><code class="varname">session_replication_role</code> (<code class="type">enum</code>)256      <a id="id-1.6.7.14.2.2.15.1.3" class="indexterm"></a>257      </span> <a href="#GUC-SESSION-REPLICATION-ROLE" class="id_link">#</a></dt><dd><p>258        Controls firing of replication-related triggers and rules for the259        current session.260        Possible values are <code class="literal">origin</code> (the default),261        <code class="literal">replica</code> and <code class="literal">local</code>.262        Setting this parameter results in discarding any previously cached263        query plans.264        Only superusers and users with the appropriate <code class="literal">SET</code>265        privilege can change this setting.266       </p><p>267        The intended use of this setting is that logical replication systems268        set it to <code class="literal">replica</code> when they are applying replicated269        changes.  The effect of that will be that triggers and rules (that270        have not been altered from their default configuration) will not fire271        on the replica.  See the <a class="link" href="sql-altertable.html" title="ALTER TABLE"><code class="command">ALTER TABLE</code></a> clauses272        <code class="literal">ENABLE TRIGGER</code> and <code class="literal">ENABLE RULE</code>273        for more information.274       </p><p>275        PostgreSQL treats the settings <code class="literal">origin</code> and276        <code class="literal">local</code> the same internally.  Third-party replication277        systems may use these two values for their internal purposes, for278        example using <code class="literal">local</code> to designate a session whose279        changes should not be replicated.280       </p><p>281        Since foreign keys are implemented as triggers, setting this parameter282        to <code class="literal">replica</code> also disables all foreign key checks,283        which can leave data in an inconsistent state if improperly used.284       </p></dd><dt id="GUC-STATEMENT-TIMEOUT"><span class="term"><code class="varname">statement_timeout</code> (<code class="type">integer</code>)285      <a id="id-1.6.7.14.2.2.16.1.3" class="indexterm"></a>286      </span> <a href="#GUC-STATEMENT-TIMEOUT" class="id_link">#</a></dt><dd><p>287        Abort any statement that takes more than the specified amount of time.288        If <code class="varname">log_min_error_statement</code> is set289        to <code class="literal">ERROR</code> or lower, the statement that timed out290        will also be logged.291        If this value is specified without units, it is taken as milliseconds.292        A value of zero (the default) disables the timeout.293       </p><p>294        The timeout is measured from the time a command arrives at the295        server until it is completed by the server.  If multiple SQL296        statements appear in a single simple-Query message, the timeout297        is applied to each statement separately.298        (<span class="productname">PostgreSQL</span> versions before 13 usually299        treated the timeout as applying to the whole query string.)300        In extended query protocol, the timeout starts running when any301        query-related message (Parse, Bind, Execute, Describe) arrives, and302        it is canceled by completion of an Execute or Sync message.303       </p><p>304        Setting <code class="varname">statement_timeout</code> in305        <code class="filename">postgresql.conf</code> is not recommended because it would306        affect all sessions.307       </p></dd><dt id="GUC-LOCK-TIMEOUT"><span class="term"><code class="varname">lock_timeout</code> (<code class="type">integer</code>)308      <a id="id-1.6.7.14.2.2.17.1.3" class="indexterm"></a>309      </span> <a href="#GUC-LOCK-TIMEOUT" class="id_link">#</a></dt><dd><p>310        Abort any statement that waits longer than the specified amount of311        time while attempting to acquire a lock on a table, index,312        row, or other database object.  The time limit applies separately to313        each lock acquisition attempt.  The limit applies both to explicit314        locking requests (such as <code class="command">LOCK TABLE</code>, or <code class="command">SELECT315        FOR UPDATE</code> without <code class="literal">NOWAIT</code>) and to implicitly-acquired316        locks.317        If this value is specified without units, it is taken as milliseconds.318        A value of zero (the default) disables the timeout.319       </p><p>320        Unlike <code class="varname">statement_timeout</code>, this timeout can only occur321        while waiting for locks.  Note that if <code class="varname">statement_timeout</code>322        is nonzero, it is rather pointless to set <code class="varname">lock_timeout</code> to323        the same or larger value, since the statement timeout would always324        trigger first.  If <code class="varname">log_min_error_statement</code> is set to325        <code class="literal">ERROR</code> or lower, the statement that timed out will be326        logged.327       </p><p>328        Setting <code class="varname">lock_timeout</code> in329        <code class="filename">postgresql.conf</code> is not recommended because it would330        affect all sessions.331       </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>)332      <a id="id-1.6.7.14.2.2.18.1.3" class="indexterm"></a>333      </span> <a href="#GUC-IDLE-IN-TRANSACTION-SESSION-TIMEOUT" class="id_link">#</a></dt><dd><p>334        Terminate any session that has been idle (that is, waiting for a335        client query) within an open transaction for longer than the336        specified amount of time.337        If this value is specified without units, it is taken as milliseconds.338        A value of zero (the default) disables the timeout.339       </p><p>340        This option can be used to ensure that idle sessions do not hold341        locks for an unreasonable amount of time.  Even when no significant342        locks are held, an open transaction prevents vacuuming away343        recently-dead tuples that may be visible only to this transaction;344        so remaining idle for a long time can contribute to table bloat.345        See <a class="xref" href="routine-vacuuming.html" title="25.1. Routine Vacuuming">Section 25.1</a> for more details.346       </p></dd><dt id="GUC-IDLE-SESSION-TIMEOUT"><span class="term"><code class="varname">idle_session_timeout</code> (<code class="type">integer</code>)347      <a id="id-1.6.7.14.2.2.19.1.3" class="indexterm"></a>348      </span> <a href="#GUC-IDLE-SESSION-TIMEOUT" class="id_link">#</a></dt><dd><p>349        Terminate any session that has been idle (that is, waiting for a350        client query), but not within an open transaction, for longer than351        the specified amount of time.352        If this value is specified without units, it is taken as milliseconds.353        A value of zero (the default) disables the timeout.354       </p><p>355        Unlike the case with an open transaction, an idle session without a356        transaction imposes no large costs on the server, so there is less357        need to enable this timeout358        than <code class="varname">idle_in_transaction_session_timeout</code>.359       </p><p>360        Be wary of enforcing this timeout on connections made through361        connection-pooling software or other middleware, as such a layer362        may not react well to unexpected connection closure.  It may be363        helpful to enable this timeout only for interactive sessions,364        perhaps by applying it only to particular users.365       </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>)366      <a id="id-1.6.7.14.2.2.20.1.3" class="indexterm"></a>367      </span> <a href="#GUC-VACUUM-FREEZE-TABLE-AGE" class="id_link">#</a></dt><dd><p>368        <code class="command">VACUUM</code> performs an aggressive scan if the table's369        <code class="structname">pg_class</code>.<code class="structfield">relfrozenxid</code> field has reached370        the age specified by this setting.  An aggressive scan differs from371        a regular <code class="command">VACUUM</code> in that it visits every page that might372        contain unfrozen XIDs or MXIDs, not just those that might contain dead373        tuples.  The default is 150 million transactions.  Although users can374        set this value anywhere from zero to two billion, <code class="command">VACUUM</code>375        will silently limit the effective value to 95% of376        <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-FREEZE-MAX-AGE">autovacuum_freeze_max_age</a>, so that a377        periodic manual <code class="command">VACUUM</code> has a chance to run before an378        anti-wraparound autovacuum is launched for the table. For more379        information see380        <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-WRAPAROUND" title="25.1.5. Preventing Transaction ID Wraparound Failures">Section 25.1.5</a>.381       </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>)382      <a id="id-1.6.7.14.2.2.21.1.3" class="indexterm"></a>383      </span> <a href="#GUC-VACUUM-FREEZE-MIN-AGE" class="id_link">#</a></dt><dd><p>384        Specifies the cutoff age (in transactions) that385        <code class="command">VACUUM</code> should use to decide whether to386        trigger freezing of pages that have an older XID.387        The default is 50 million transactions.  Although388        users can set this value anywhere from zero to one billion,389        <code class="command">VACUUM</code> will silently limit the effective value to half390        the value of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-FREEZE-MAX-AGE">autovacuum_freeze_max_age</a>, so391        that there is not an unreasonably short time between forced392        autovacuums.  For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-WRAPAROUND" title="25.1.5. Preventing Transaction ID Wraparound Failures">Section 25.1.5</a>.393       </p></dd><dt id="GUC-VACUUM-FAILSAFE-AGE"><span class="term"><code class="varname">vacuum_failsafe_age</code> (<code class="type">integer</code>)394      <a id="id-1.6.7.14.2.2.22.1.3" class="indexterm"></a>395      </span> <a href="#GUC-VACUUM-FAILSAFE-AGE" class="id_link">#</a></dt><dd><p>396        Specifies the maximum age (in transactions) that a table's397        <code class="structname">pg_class</code>.<code class="structfield">relfrozenxid</code>398        field can attain before <code class="command">VACUUM</code> takes399        extraordinary measures to avoid system-wide transaction ID400        wraparound failure.  This is <code class="command">VACUUM</code>'s401        strategy of last resort.  The failsafe typically triggers402        when an autovacuum to prevent transaction ID wraparound has403        already been running for some time, though it's possible for404        the failsafe to trigger during any <code class="command">VACUUM</code>.405       </p><p>406        When the failsafe is triggered, any cost-based delay that is407        in effect will no longer be applied, further non-essential408        maintenance tasks (such as index vacuuming) are bypassed, and any409        <a class="glossterm" href="glossary.html#GLOSSARY-BUFFER-ACCESS-STRATEGY"><em class="glossterm"><a class="glossterm" href="glossary.html#GLOSSARY-BUFFER-ACCESS-STRATEGY" title="Buffer Access Strategy">Buffer Access Strategy</a></em></a>410        in use will be disabled resulting in <code class="command">VACUUM</code> being411        free to make use of all of412        <a class="glossterm" href="glossary.html#GLOSSARY-SHARED-MEMORY"><em class="glossterm"><a class="glossterm" href="glossary.html#GLOSSARY-SHARED-MEMORY" title="Shared memory">shared buffers</a></em></a>.413       </p><p>414        The default is 1.6 billion transactions.  Although users can415        set this value anywhere from zero to 2.1 billion,416        <code class="command">VACUUM</code> will silently adjust the effective417        value to no less than 105% of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-FREEZE-MAX-AGE">autovacuum_freeze_max_age</a>.418       </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>)419      <a id="id-1.6.7.14.2.2.23.1.3" class="indexterm"></a>420      </span> <a href="#GUC-VACUUM-MULTIXACT-FREEZE-TABLE-AGE" class="id_link">#</a></dt><dd><p>421        <code class="command">VACUUM</code> performs an aggressive scan if the table's422        <code class="structname">pg_class</code>.<code class="structfield">relminmxid</code> field has reached423        the age specified by this setting.  An aggressive scan differs from424        a regular <code class="command">VACUUM</code> in that it visits every page that might425        contain unfrozen XIDs or MXIDs, not just those that might contain dead426        tuples.  The default is 150 million multixacts.427        Although users can set this value anywhere from zero to two billion,428        <code class="command">VACUUM</code> will silently limit the effective value to 95% of429        <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-MULTIXACT-FREEZE-MAX-AGE">autovacuum_multixact_freeze_max_age</a>, so that a430        periodic manual <code class="command">VACUUM</code> has a chance to run before an431        anti-wraparound is launched for the table.432        For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND" title="25.1.5.1. Multixacts and Wraparound">Section 25.1.5.1</a>.433       </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>)434      <a id="id-1.6.7.14.2.2.24.1.3" class="indexterm"></a>435      </span> <a href="#GUC-VACUUM-MULTIXACT-FREEZE-MIN-AGE" class="id_link">#</a></dt><dd><p>436        Specifies the cutoff age (in multixacts) that <code class="command">VACUUM</code>437        should use to decide whether to trigger freezing of pages with438        an older multixact ID.  The default is 5 million multixacts.439        Although users can set this value anywhere from zero to one billion,440        <code class="command">VACUUM</code> will silently limit the effective value to half441        the value of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-MULTIXACT-FREEZE-MAX-AGE">autovacuum_multixact_freeze_max_age</a>,442        so that there is not an unreasonably short time between forced443        autovacuums.444        For more information see <a class="xref" href="routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND" title="25.1.5.1. Multixacts and Wraparound">Section 25.1.5.1</a>.445       </p></dd><dt id="GUC-VACUUM-MULTIXACT-FAILSAFE-AGE"><span class="term"><code class="varname">vacuum_multixact_failsafe_age</code> (<code class="type">integer</code>)446      <a id="id-1.6.7.14.2.2.25.1.3" class="indexterm"></a>447      </span> <a href="#GUC-VACUUM-MULTIXACT-FAILSAFE-AGE" class="id_link">#</a></dt><dd><p>448        Specifies the maximum age (in multixacts) that a table's449        <code class="structname">pg_class</code>.<code class="structfield">relminmxid</code>450        field can attain before <code class="command">VACUUM</code> takes451        extraordinary measures to avoid system-wide multixact ID452        wraparound failure.  This is <code class="command">VACUUM</code>'s453        strategy of last resort.  The failsafe typically triggers when454        an autovacuum to prevent transaction ID wraparound has already455        been running for some time, though it's possible for the456        failsafe to trigger during any <code class="command">VACUUM</code>.457       </p><p>458        When the failsafe is triggered, any cost-based delay that is459        in effect will no longer be applied, and further non-essential460        maintenance tasks (such as index vacuuming) are bypassed.461       </p><p>462        The default is 1.6 billion multixacts.  Although users can set463        this value anywhere from zero to 2.1 billion,464        <code class="command">VACUUM</code> will silently adjust the effective465        value to no less than 105% of <a class="xref" href="runtime-config-autovacuum.html#GUC-AUTOVACUUM-MULTIXACT-FREEZE-MAX-AGE">autovacuum_multixact_freeze_max_age</a>.466       </p></dd><dt id="GUC-BYTEA-OUTPUT"><span class="term"><code class="varname">bytea_output</code> (<code class="type">enum</code>)467      <a id="id-1.6.7.14.2.2.26.1.3" class="indexterm"></a>468      </span> <a href="#GUC-BYTEA-OUTPUT" class="id_link">#</a></dt><dd><p>469        Sets the output format for values of type <code class="type">bytea</code>.470        Valid values are <code class="literal">hex</code> (the default)471        and <code class="literal">escape</code> (the traditional PostgreSQL472        format).  See <a class="xref" href="datatype-binary.html" title="8.4. Binary Data Types">Section 8.4</a> for more473        information.  The <code class="type">bytea</code> type always474        accepts both formats on input, regardless of this setting.475       </p></dd><dt id="GUC-XMLBINARY"><span class="term"><code class="varname">xmlbinary</code> (<code class="type">enum</code>)476      <a id="id-1.6.7.14.2.2.27.1.3" class="indexterm"></a>477      </span> <a href="#GUC-XMLBINARY" class="id_link">#</a></dt><dd><p>478        Sets how binary values are to be encoded in XML.  This applies479        for example when <code class="type">bytea</code> values are converted to480        XML by the functions <code class="function">xmlelement</code> or481        <code class="function">xmlforest</code>.  Possible values are482        <code class="literal">base64</code> and <code class="literal">hex</code>, which483        are both defined in the XML Schema standard.  The default is484        <code class="literal">base64</code>.  For further information about485        XML-related functions, see <a class="xref" href="functions-xml.html" title="9.15. XML Functions">Section 9.15</a>.486       </p><p>487        The actual choice here is mostly a matter of taste,488        constrained only by possible restrictions in client489        applications.  Both methods support all possible values,490        although the hex encoding will be somewhat larger than the491        base64 encoding.492       </p></dd><dt id="GUC-XMLOPTION"><span class="term"><code class="varname">xmloption</code> (<code class="type">enum</code>)493      <a id="id-1.6.7.14.2.2.28.1.3" class="indexterm"></a>494      <a id="id-1.6.7.14.2.2.28.1.4" class="indexterm"></a>495      <a id="id-1.6.7.14.2.2.28.1.5" class="indexterm"></a>496      </span> <a href="#GUC-XMLOPTION" class="id_link">#</a></dt><dd><p>497        Sets whether <code class="literal">DOCUMENT</code> or498        <code class="literal">CONTENT</code> is implicit when converting between499        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.  Valid500        values are <code class="literal">DOCUMENT</code> and501        <code class="literal">CONTENT</code>.  The default is502        <code class="literal">CONTENT</code>.503       </p><p>504        According to the SQL standard, the command to set this option is505</p><pre class="synopsis">506SET XML OPTION { DOCUMENT | CONTENT };507</pre><p>508        This syntax is also available in PostgreSQL.509       </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>)510      <a id="id-1.6.7.14.2.2.29.1.3" class="indexterm"></a>511      </span> <a href="#GUC-GIN-PENDING-LIST-LIMIT" class="id_link">#</a></dt><dd><p>512        Sets the maximum size of a GIN index's pending list, which is used513        when <code class="literal">fastupdate</code> is enabled. If the list grows514        larger than this maximum size, it is cleaned up by moving515        the entries in it to the index's main GIN data structure in bulk.516        If this value is specified without units, it is taken as kilobytes.517        The default is four megabytes (<code class="literal">4MB</code>). This setting518        can be overridden for individual GIN indexes by changing519        index storage parameters.520         See <a class="xref" href="gin-implementation.html#GIN-FAST-UPDATE" title="70.4.1. GIN Fast Update Technique">Section 70.4.1</a> and <a class="xref" href="gin-tips.html" title="70.5. GIN Tips and Tricks">Section 70.5</a>521         for more information.522       </p></dd><dt id="GUC-CREATEROLE-SELF-GRANT"><span class="term"><code class="varname">createrole_self_grant</code> (<code class="type">string</code>)523      <a id="id-1.6.7.14.2.2.30.1.3" class="indexterm"></a>524      </span> <a href="#GUC-CREATEROLE-SELF-GRANT" class="id_link">#</a></dt><dd><p>525        If a user who has <code class="literal">CREATEROLE</code> but not526        <code class="literal">SUPERUSER</code> creates a role, and if this527        is set to a non-empty value, the newly-created role will be granted528        to the creating user with the options specified. The value must be529        <code class="literal">set</code>, <code class="literal">inherit</code>, or a530        comma-separated list of these. The default value is an empty string,531        which disables the feature.532       </p><p>533        The purpose of this option is to allow a <code class="literal">CREATEROLE</code>534        user who is not a superuser to automatically inherit, or automatically535        gain the ability to <code class="literal">SET ROLE</code> to, any created users.536        Since a <code class="literal">CREATEROLE</code> user is always implicitly granted537        <code class="literal">ADMIN OPTION</code> on created roles, that user could538        always execute a <code class="literal">GRANT</code> statement that would achieve539        the same effect as this setting. However, it can be convenient for540        usability reasons if the grant happens automatically. A superuser541        automatically inherits the privileges of every role and can always542        <code class="literal">SET ROLE</code> to any role, and this setting can be used543        to produce a similar behavior for <code class="literal">CREATEROLE</code> users544        for users which they create.545       </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-FORMAT"><div class="titlepage"><div><div><h3 class="title">20.11.2. Locale and Formatting <a href="#RUNTIME-CONFIG-CLIENT-FORMAT" class="id_link">#</a></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>)546      <a id="id-1.6.7.14.3.2.1.1.3" class="indexterm"></a>547      </span> <a href="#GUC-DATESTYLE" class="id_link">#</a></dt><dd><p>548        Sets the display format for date and time values, as well as the549        rules for interpreting ambiguous date input values. For550        historical reasons, this variable contains two independent551        components: the output format specification (<code class="literal">ISO</code>,552        <code class="literal">Postgres</code>, <code class="literal">SQL</code>, or <code class="literal">German</code>)553        and the input/output specification for year/month/day ordering554        (<code class="literal">DMY</code>, <code class="literal">MDY</code>, or <code class="literal">YMD</code>). These555        can be set separately or together. The keywords <code class="literal">Euro</code>556        and <code class="literal">European</code> are synonyms for <code class="literal">DMY</code>; the557        keywords <code class="literal">US</code>, <code class="literal">NonEuro</code>, and558        <code class="literal">NonEuropean</code> are synonyms for <code class="literal">MDY</code>. See559        <a class="xref" href="datatype-datetime.html" title="8.5. Date/Time Types">Section 8.5</a> for more information. The560        built-in default is <code class="literal">ISO, MDY</code>, but561        <span class="application">initdb</span> will initialize the562        configuration file with a setting that corresponds to the563        behavior of the chosen <code class="varname">lc_time</code> locale.564       </p></dd><dt id="GUC-INTERVALSTYLE"><span class="term"><code class="varname">IntervalStyle</code> (<code class="type">enum</code>)565      <a id="id-1.6.7.14.3.2.2.1.3" class="indexterm"></a>566      </span> <a href="#GUC-INTERVALSTYLE" class="id_link">#</a></dt><dd><p>567        Sets the display format for interval values.568        The value <code class="literal">sql_standard</code> will produce569        output matching <acronym class="acronym">SQL</acronym> standard interval literals.570        The value <code class="literal">postgres</code> (which is the default) will produce571        output matching <span class="productname">PostgreSQL</span> releases prior to 8.4572        when the <a class="xref" href="runtime-config-client.html#GUC-DATESTYLE">DateStyle</a>573        parameter was set to <code class="literal">ISO</code>.574        The value <code class="literal">postgres_verbose</code> will produce output575        matching <span class="productname">PostgreSQL</span> releases prior to 8.4576        when the <code class="varname">DateStyle</code>577        parameter was set to non-<code class="literal">ISO</code> output.578        The value <code class="literal">iso_8601</code> will produce output matching the time579        interval <span class="quote">“<span class="quote">format with designators</span>”</span> defined in section580        4.4.3.2 of ISO 8601.581       </p><p>582        The <code class="varname">IntervalStyle</code> parameter also affects the583        interpretation of ambiguous interval input.  See584        <a class="xref" href="datatype-datetime.html#DATATYPE-INTERVAL-INPUT" title="8.5.4. Interval Input">Section 8.5.4</a> for more information.585       </p></dd><dt id="GUC-TIMEZONE"><span class="term"><code class="varname">TimeZone</code> (<code class="type">string</code>)586      <a id="id-1.6.7.14.3.2.3.1.3" class="indexterm"></a>587      <a id="id-1.6.7.14.3.2.3.1.4" class="indexterm"></a>588      </span> <a href="#GUC-TIMEZONE" class="id_link">#</a></dt><dd><p>589        Sets the time zone for displaying and interpreting time stamps.590        The built-in default is <code class="literal">GMT</code>, but that is typically591        overridden in <code class="filename">postgresql.conf</code>; <span class="application">initdb</span>592        will install a setting there corresponding to its system environment.593        See <a class="xref" href="datatype-datetime.html#DATATYPE-TIMEZONES" title="8.5.3. Time Zones">Section 8.5.3</a> for more information.594       </p></dd><dt id="GUC-TIMEZONE-ABBREVIATIONS"><span class="term"><code class="varname">timezone_abbreviations</code> (<code class="type">string</code>)595      <a id="id-1.6.7.14.3.2.4.1.3" class="indexterm"></a>596      <a id="id-1.6.7.14.3.2.4.1.4" class="indexterm"></a>597      </span> <a href="#GUC-TIMEZONE-ABBREVIATIONS" class="id_link">#</a></dt><dd><p>598        Sets the collection of time zone abbreviations that will be accepted599        by the server for datetime input.  The default is <code class="literal">'Default'</code>,600        which is a collection that works in most of the world; there are601        also <code class="literal">'Australia'</code> and <code class="literal">'India'</code>,602        and other collections can be defined for a particular installation.603        See <a class="xref" href="datetime-config-files.html" title="B.4. Date/Time Configuration Files">Section B.4</a> for more information.604       </p></dd><dt id="GUC-EXTRA-FLOAT-DIGITS"><span class="term"><code class="varname">extra_float_digits</code> (<code class="type">integer</code>)605      <a id="id-1.6.7.14.3.2.5.1.3" class="indexterm"></a>606      <a id="id-1.6.7.14.3.2.5.1.4" class="indexterm"></a>607      <a id="id-1.6.7.14.3.2.5.1.5" class="indexterm"></a>608      </span> <a href="#GUC-EXTRA-FLOAT-DIGITS" class="id_link">#</a></dt><dd><p>609        This parameter adjusts the number of digits used for textual output of610        floating-point values, including <code class="type">float4</code>, <code class="type">float8</code>,611        and geometric data types.612       </p><p>613        If the value is 1 (the default) or above, float values are output in614        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>. The615        actual number of digits generated depends only on the value being616        output, not on the value of this parameter. At most 17 digits are617        required for <code class="type">float8</code> values, and 9 for <code class="type">float4</code>618        values. This format is both fast and precise, preserving the original619        binary float value exactly when correctly read. For historical620        compatibility, values up to 3 are permitted.621       </p><p>622        If the value is zero or negative, then the output is rounded to a623        given decimal precision. The precision used is the standard number of624        digits for the type (<code class="literal">FLT_DIG</code>625        or <code class="literal">DBL_DIG</code> as appropriate) reduced according to the626        value of this parameter. (For example, specifying -1 will cause627        <code class="type">float4</code> values to be output rounded to 5 significant628        digits, and <code class="type">float8</code> values629        rounded to 14 digits.) This format is slower and does not preserve all630        the bits of the binary float value, but may be more human-readable.631       </p><div class="note"><h3 class="title">Note</h3><p>632         The meaning of this parameter, and its default value, changed633         in <span class="productname">PostgreSQL</span> 12;634         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.635        </p></div></dd><dt id="GUC-CLIENT-ENCODING"><span class="term"><code class="varname">client_encoding</code> (<code class="type">string</code>)636      <a id="id-1.6.7.14.3.2.6.1.3" class="indexterm"></a>637      <a id="id-1.6.7.14.3.2.6.1.4" class="indexterm"></a>638      </span> <a href="#GUC-CLIENT-ENCODING" class="id_link">#</a></dt><dd><p>639        Sets the client-side encoding (character set).640        The default is to use the database encoding.641        The character sets supported by the <span class="productname">PostgreSQL</span>642        server are described in <a class="xref" href="multibyte.html#MULTIBYTE-CHARSET-SUPPORTED" title="24.3.1. Supported Character Sets">Section 24.3.1</a>.643       </p></dd><dt id="GUC-LC-MESSAGES"><span class="term"><code class="varname">lc_messages</code> (<code class="type">string</code>)644      <a id="id-1.6.7.14.3.2.7.1.3" class="indexterm"></a>645      </span> <a href="#GUC-LC-MESSAGES" class="id_link">#</a></dt><dd><p>646        Sets the language in which messages are displayed.  Acceptable647        values are system-dependent; see <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a> for648        more information.  If this variable is set to the empty string649        (which is the default) then the value is inherited from the650        execution environment of the server in a system-dependent way.651       </p><p>652        On some systems, this locale category does not exist.  Setting653        this variable will still work, but there will be no effect.654        Also, there is a chance that no translated messages for the655        desired language exist.  In that case you will continue to see656        the English messages.657       </p><p>658        Only superusers and users with the appropriate <code class="literal">SET</code>659        privilege can change this setting.660       </p></dd><dt id="GUC-LC-MONETARY"><span class="term"><code class="varname">lc_monetary</code> (<code class="type">string</code>)661      <a id="id-1.6.7.14.3.2.8.1.3" class="indexterm"></a>662      </span> <a href="#GUC-LC-MONETARY" class="id_link">#</a></dt><dd><p>663        Sets the locale to use for formatting monetary amounts, for664        example with the <code class="function">to_char</code> family of665        functions.  Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a> for more information.  If this variable is666        set to the empty string (which is the default) then the value667        is inherited from the execution environment of the server in a668        system-dependent way.669       </p></dd><dt id="GUC-LC-NUMERIC"><span class="term"><code class="varname">lc_numeric</code> (<code class="type">string</code>)670      <a id="id-1.6.7.14.3.2.9.1.3" class="indexterm"></a>671      </span> <a href="#GUC-LC-NUMERIC" class="id_link">#</a></dt><dd><p>672        Sets the locale to use for formatting numbers, for example673        with the <code class="function">to_char</code> family of674        functions. Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a> for more information.  If this variable is675        set to the empty string (which is the default) then the value676        is inherited from the execution environment of the server in a677        system-dependent way.678       </p></dd><dt id="GUC-LC-TIME"><span class="term"><code class="varname">lc_time</code> (<code class="type">string</code>)679      <a id="id-1.6.7.14.3.2.10.1.3" class="indexterm"></a>680      </span> <a href="#GUC-LC-TIME" class="id_link">#</a></dt><dd><p>681        Sets the locale to use for formatting dates and times, for example682        with the <code class="function">to_char</code> family of683        functions. Acceptable values are system-dependent; see <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a> for more information.  If this variable is684        set to the empty string (which is the default) then the value685        is inherited from the execution environment of the server in a686        system-dependent way.687       </p></dd><dt id="GUC-ICU-VALIDATION-LEVEL"><span class="term"><code class="varname">icu_validation_level</code> (<code class="type">enum</code>)688      <a id="id-1.6.7.14.3.2.11.1.3" class="indexterm"></a>689      </span> <a href="#GUC-ICU-VALIDATION-LEVEL" class="id_link">#</a></dt><dd><p>690        When ICU locale validation problems are encountered, controls which691        <a class="link" href="runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS" title="Table 20.2. Message Severity Levels">message level</a> is692        used to report the problem. Valid values are693        <code class="literal">DISABLED</code>, <code class="literal">DEBUG5</code>,694        <code class="literal">DEBUG4</code>, <code class="literal">DEBUG3</code>,695        <code class="literal">DEBUG2</code>, <code class="literal">DEBUG1</code>,696        <code class="literal">INFO</code>, <code class="literal">NOTICE</code>,697        <code class="literal">WARNING</code>, <code class="literal">ERROR</code>, and698        <code class="literal">LOG</code>.699       </p><p>700        If set to <code class="literal">DISABLED</code>, does not report validation701        problems at all. Otherwise reports problems at the given message702        level. The default is <code class="literal">WARNING</code>.703       </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>)704      <a id="id-1.6.7.14.3.2.12.1.3" class="indexterm"></a>705      </span> <a href="#GUC-DEFAULT-TEXT-SEARCH-CONFIG" class="id_link">#</a></dt><dd><p>706        Selects the text search configuration that is used by those variants707        of the text search functions that do not have an explicit argument708        specifying the configuration.709        See <a class="xref" href="textsearch.html" title="Chapter 12. Full Text Search">Chapter 12</a> for further information.710        The built-in default is <code class="literal">pg_catalog.simple</code>, but711        <span class="application">initdb</span> will initialize the712        configuration file with a setting that corresponds to the713        chosen <code class="varname">lc_ctype</code> locale, if a configuration714        matching that locale can be identified.715       </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-PRELOAD"><div class="titlepage"><div><div><h3 class="title">20.11.3. Shared Library Preloading <a href="#RUNTIME-CONFIG-CLIENT-PRELOAD" class="id_link">#</a></h3></div></div></div><p>716      Several settings are available for preloading shared libraries into the717      server, in order to load additional functionality or achieve performance718      benefits.  For example, a setting of719      <code class="literal">'$libdir/mylib'</code> would cause720      <code class="literal">mylib.so</code> (or on some platforms,721      <code class="literal">mylib.sl</code>) to be preloaded from the installation's standard722      library directory.  The differences between the settings are when they723      take effect and what privileges are required to change them.724     </p><p>725      <span class="productname">PostgreSQL</span> procedural language libraries can726      be preloaded in this way, typically by using the727      syntax <code class="literal">'$libdir/plXXX'</code> where728      <code class="literal">XXX</code> is <code class="literal">pgsql</code>, <code class="literal">perl</code>,729      <code class="literal">tcl</code>, or <code class="literal">python</code>.730     </p><p>731      Only shared libraries specifically intended to be used with PostgreSQL732      can be loaded this way.  Every PostgreSQL-supported library has733      a <span class="quote">“<span class="quote">magic block</span>”</span> that is checked to guarantee compatibility.  For734      this reason, non-PostgreSQL libraries cannot be loaded in this way.  You735      might be able to use operating-system facilities such736      as <code class="envar">LD_PRELOAD</code> for that.737     </p><p>738      In general, refer to the documentation of a specific module for the739      recommended way to load that module.740     </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>)741      <a id="id-1.6.7.14.4.6.1.1.3" class="indexterm"></a>742      <a id="id-1.6.7.14.4.6.1.1.4" class="indexterm"></a>743      </span> <a href="#GUC-LOCAL-PRELOAD-LIBRARIES" class="id_link">#</a></dt><dd><p>744        This variable specifies one or more shared libraries that are to be745        preloaded at connection start.746        It contains a comma-separated list of library names, where each name747        is interpreted as for the <a class="link" href="sql-load.html" title="LOAD"><code class="command">LOAD</code></a> command.748        Whitespace between entries is ignored; surround a library name with749        double quotes if you need to include whitespace or commas in the name.750        The parameter value only takes effect at the start of the connection.751        Subsequent changes have no effect.  If a specified library is not752        found, the connection attempt will fail.753       </p><p>754        This option can be set by any user.  Because of that, the libraries755        that can be loaded are restricted to those appearing in the756        <code class="filename">plugins</code> subdirectory of the installation's757        standard library directory.  (It is the database administrator's758        responsibility to ensure that only <span class="quote">“<span class="quote">safe</span>”</span> libraries759        are installed there.)  Entries in <code class="varname">local_preload_libraries</code>760        can specify this directory explicitly, for example761        <code class="literal">$libdir/plugins/mylib</code>, or just specify762        the library name — <code class="literal">mylib</code> would have763        the same effect as <code class="literal">$libdir/plugins/mylib</code>.764       </p><p>765        The intent of this feature is to allow unprivileged users to load766        debugging or performance-measurement libraries into specific sessions767        without requiring an explicit <code class="command">LOAD</code> command.  To that end,768        it would be typical to set this parameter using769        the <code class="envar">PGOPTIONS</code> environment variable on the client or by770        using771        <code class="command">ALTER ROLE SET</code>.772       </p><p>773        However, unless a module is specifically designed to be used in this way by774        non-superusers, this is usually not the right setting to use.  Look775        at <a class="xref" href="runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a> instead.776       </p></dd><dt id="GUC-SESSION-PRELOAD-LIBRARIES"><span class="term"><code class="varname">session_preload_libraries</code> (<code class="type">string</code>)777      <a id="id-1.6.7.14.4.6.2.1.3" class="indexterm"></a>778      </span> <a href="#GUC-SESSION-PRELOAD-LIBRARIES" class="id_link">#</a></dt><dd><p>779        This variable specifies one or more shared libraries that are to be780        preloaded at connection start.781        It contains a comma-separated list of library names, where each name782        is interpreted as for the <a class="link" href="sql-load.html" title="LOAD"><code class="command">LOAD</code></a> command.783        Whitespace between entries is ignored; surround a library name with784        double quotes if you need to include whitespace or commas in the name.785        The parameter value only takes effect at the start of the connection.786        Subsequent changes have no effect.  If a specified library is not787        found, the connection attempt will fail.788        Only superusers and users with the appropriate <code class="literal">SET</code>789        privilege can change this setting.790       </p><p>791        The intent of this feature is to allow debugging or792        performance-measurement libraries to be loaded into specific sessions793        without an explicit794        <code class="command">LOAD</code> command being given.  For795        example, <a class="xref" href="auto-explain.html" title="F.4. auto_explain — log execution plans of slow queries">auto_explain</a> could be enabled for all796        sessions under a given user name by setting this parameter797        with <code class="command">ALTER ROLE SET</code>.  Also, this parameter can be changed798        without restarting the server (but changes only take effect when a new799        session is started), so it is easier to add new modules this way, even800        if they should apply to all sessions.801       </p><p>802        Unlike <a class="xref" href="runtime-config-client.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a>, there is no large803        performance advantage to loading a library at session start rather than804        when it is first used.  There is some advantage, however, when805        connection pooling is used.806       </p></dd><dt id="GUC-SHARED-PRELOAD-LIBRARIES"><span class="term"><code class="varname">shared_preload_libraries</code> (<code class="type">string</code>)807      <a id="id-1.6.7.14.4.6.3.1.3" class="indexterm"></a>808      </span> <a href="#GUC-SHARED-PRELOAD-LIBRARIES" class="id_link">#</a></dt><dd><p>809        This variable specifies one or more shared libraries to be preloaded at810        server start.811        It contains a comma-separated list of library names, where each name812        is interpreted as for the <a class="link" href="sql-load.html" title="LOAD"><code class="command">LOAD</code></a> command.813        Whitespace between entries is ignored; surround a library name with814        double quotes if you need to include whitespace or commas in the name.815        This parameter can only be set at server start.  If a specified816        library is not found, the server will fail to start.817       </p><p>818        Some libraries need to perform certain operations that can only take819        place at postmaster start, such as allocating shared memory, reserving820        light-weight locks, or starting background workers.  Those libraries821        must be loaded at server start through this parameter.  See the822        documentation of each library for details.823       </p><p>824        Other libraries can also be preloaded.  By preloading a shared library,825        the library startup time is avoided when the library is first used.826        However, the time to start each new server process might increase827        slightly, even if that process never uses the library.  So this828        parameter is recommended only for libraries that will be used in most829        sessions.  Also, changing this parameter requires a server restart, so830        this is not the right setting to use for short-term debugging tasks,831        say.  Use <a class="xref" href="runtime-config-client.html#GUC-SESSION-PRELOAD-LIBRARIES">session_preload_libraries</a> for that832        instead.833       </p><div class="note"><h3 class="title">Note</h3><p>834        On Windows hosts, preloading a library at server start will not reduce835        the time required to start each new server process; each server process836        will re-load all preload libraries.  However, <code class="varname">shared_preload_libraries837        </code> is still useful on Windows hosts for libraries that need to838        perform operations at postmaster start time.839       </p></div></dd><dt id="GUC-JIT-PROVIDER"><span class="term"><code class="varname">jit_provider</code> (<code class="type">string</code>)840       <a id="id-1.6.7.14.4.6.4.1.3" class="indexterm"></a>841      </span> <a href="#GUC-JIT-PROVIDER" class="id_link">#</a></dt><dd><p>842        This variable is the name of the JIT provider library to be used843        (see <a class="xref" href="jit-extensibility.html#JIT-PLUGGABLE" title="32.4.2. Pluggable JIT Providers">Section 32.4.2</a>).844        The default is <code class="literal">llvmjit</code>.845        This parameter can only be set at server start.846       </p><p>847        If set to a non-existent library, <acronym class="acronym">JIT</acronym> will not be848        available, but no error will be raised. This allows JIT support to be849        installed separately from the main850        <span class="productname">PostgreSQL</span> package.851       </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-CLIENT-OTHER"><div class="titlepage"><div><div><h3 class="title">20.11.4. Other Defaults <a href="#RUNTIME-CONFIG-CLIENT-OTHER" class="id_link">#</a></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>)852      <a id="id-1.6.7.14.5.2.1.1.3" class="indexterm"></a>853      <a id="id-1.6.7.14.5.2.1.1.4" class="indexterm"></a>854      </span> <a href="#GUC-DYNAMIC-LIBRARY-PATH" class="id_link">#</a></dt><dd><p>855        If a dynamically loadable module needs to be opened and the856        file name specified in the <code class="command">CREATE FUNCTION</code> or857        <code class="command">LOAD</code> command858        does not have a directory component (i.e., the859        name does not contain a slash), the system will search this860        path for the required file.861       </p><p>862        The value for <code class="varname">dynamic_library_path</code> must be a863        list of absolute directory paths separated by colons (or semi-colons864        on Windows).  If a list element starts865        with the special string <code class="literal">$libdir</code>, the866        compiled-in <span class="productname">PostgreSQL</span> package867        library directory is substituted for <code class="literal">$libdir</code>; this868        is where the modules provided by the standard869        <span class="productname">PostgreSQL</span> distribution are installed.870        (Use <code class="literal">pg_config --pkglibdir</code> to find out the name of871        this directory.) For example:872</p><pre class="programlisting">873dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'874</pre><p>875        or, in a Windows environment:876</p><pre class="programlisting">877dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'878</pre><p>879       </p><p>880        The default value for this parameter is881        <code class="literal">'$libdir'</code>. If the value is set to an empty882        string, the automatic path search is turned off.883       </p><p>884        This parameter can be changed at run time by superusers and users885        with the appropriate <code class="literal">SET</code> privilege, but a886        setting done that way will only persist until the end of the887        client connection, so this method should be reserved for888        development purposes. The recommended way to set this parameter889        is in the <code class="filename">postgresql.conf</code> configuration890        file.891       </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>)892      <a id="id-1.6.7.14.5.2.2.1.3" class="indexterm"></a>893      </span> <a href="#GUC-GIN-FUZZY-SEARCH-LIMIT" class="id_link">#</a></dt><dd><p>894        Soft upper limit of the size of the set returned by GIN index scans. For more895        information see <a class="xref" href="gin-tips.html" title="70.5. GIN Tips and Tricks">Section 70.5</a>.896       </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" title="20.10. Automatic Vacuuming">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="runtime-config.html" title="Chapter 20. Server Configuration">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="runtime-config-locks.html" title="20.12. Lock Management">Next</a></td></tr><tr><td width="40%" align="left" valign="top">20.10. Automatic Vacuuming </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 20.12. Lock Management</td></tr></table></div></body></html>
codekingpro/portable-devtools · Team Ai