Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
app-initdb.html267 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>initdb</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="reference-server.html" title="PostgreSQL Server Applications" /><link rel="next" href="pgarchivecleanup.html" title="pg_archivecleanup" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center"><span class="application">initdb</span></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="reference-server.html" title="PostgreSQL Server Applications">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="reference-server.html" title="PostgreSQL Server Applications">Up</a></td><th width="60%" align="center">PostgreSQL Server Applications</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="pgarchivecleanup.html" title="pg_archivecleanup">Next</a></td></tr></table><hr /></div><div class="refentry" id="APP-INITDB"><div class="titlepage"></div><a id="id-1.9.5.3.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle"><span class="application">initdb</span></span></h2><p>initdb — create a new <span class="productname">PostgreSQL</span> database cluster</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p id="id-1.9.5.3.4.1"><code class="command">initdb</code> [<em class="replaceable"><code>option</code></em>...]  [ <code class="option">--pgdata</code>  |   <code class="option">-D</code> ]<em class="replaceable"><code> directory</code></em> </p></div></div><div class="refsect1" id="R1-APP-INITDB-1"><h2>Description</h2><p>3   <code class="command">initdb</code> creates a new4   <span class="productname">PostgreSQL</span> <a class="glossterm" href="glossary.html#GLOSSARY-DB-CLUSTER"><em class="glossterm"><a class="glossterm" href="glossary.html#GLOSSARY-DB-CLUSTER" title="Database cluster">database cluster</a></em></a>.5  </p><p>6   Creating a database cluster consists of creating the7   <a class="glossterm" href="glossary.html#GLOSSARY-DATA-DIRECTORY"><em class="glossterm"><a class="glossterm" href="glossary.html#GLOSSARY-DATA-DIRECTORY" title="Data directory">directories</a></em></a> in8   which the cluster data will live, generating the shared catalog9   tables (tables that belong to the whole cluster rather than to any10   particular database), and creating the <code class="literal">postgres</code>,11   <code class="literal">template1</code>, and <code class="literal">template0</code> databases.12   The <code class="literal">postgres</code> database is a default database meant13   for use by users, utilities and third party applications.14   <code class="literal">template1</code> and <code class="literal">template0</code> are15   meant as source databases to be copied by later <code class="command">CREATE16   DATABASE</code> commands.  <code class="literal">template0</code> should never17   be modified, but you can add objects to <code class="literal">template1</code>,18   which by default will be copied into databases created later.  See19   <a class="xref" href="manage-ag-templatedbs.html" title="23.3. Template Databases">Section 23.3</a> for more details.20  </p><p>21   Although <code class="command">initdb</code> will attempt to create the22   specified data directory, it might not have permission if the parent23   directory of the desired data directory is root-owned. To initialize24   in such a setup, create an empty data directory as root, then use25   <code class="command">chown</code> to assign ownership of that directory to the26   database user account, then <code class="command">su</code> to become the27   database user to run <code class="command">initdb</code>.28  </p><p>29   <code class="command">initdb</code> must be run as the user that will own the30   server process, because the server needs to have access to the31   files and directories that <code class="command">initdb</code> creates.32   Since the server cannot be run as root, you must not run33   <code class="command">initdb</code> as root either.  (It will in fact refuse34   to do so.)35  </p><p>36    For security reasons the new cluster created by <code class="command">initdb</code>37    will only be accessible by the cluster owner by default.  The38    <code class="option">--allow-group-access</code> option allows any user in the same39    group as the cluster owner to read files in the cluster.  This is useful40    for performing backups as a non-privileged user.41  </p><p>42   <code class="command">initdb</code> initializes the database cluster's default locale43   and character set encoding. These can also be set separately for each44   database when it is created. <code class="command">initdb</code> determines those45   settings for the template databases, which will serve as the default for46   all other databases.47  </p><p>48   By default, <code class="command">initdb</code> uses the locale provider49   <code class="literal">libc</code> (see <a class="xref" href="locale.html#LOCALE-PROVIDERS" title="24.1.4. Locale Providers">Section 24.1.4</a>). The50   <code class="literal">libc</code> locale provider takes the locale settings from the51   environment, and determines the encoding from the locale settings.52  </p><p>53   To choose a different locale for the cluster, use the option54   <code class="option">--locale</code>.  There are also individual options55   <code class="option">--lc-*</code> and <code class="option">--icu-locale</code> (see below) to56   set values for the individual locale categories.  Note that inconsistent57   settings for different locale categories can give nonsensical results, so58   this should be used with care.59  </p><p>60   Alternatively, <code class="command">initdb</code> can use the ICU library to provide61   locale services by specifying <code class="literal">--locale-provider=icu</code>. The62   server must be built with ICU support. To choose the specific ICU locale ID63   to apply, use the option <code class="option">--icu-locale</code>.  Note that for64   implementation reasons and to support legacy code,65   <code class="command">initdb</code> will still select and initialize libc locale66   settings when the ICU locale provider is used.67  </p><p>68   When <code class="command">initdb</code> runs, it will print out the locale settings69   it has chosen.  If you have complex requirements or specified multiple70   options, it is advisable to check that the result matches what was71   intended.72  </p><p>73   More details about locale settings can be found in <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a>.74  </p><p>75   To alter the default encoding, use the <code class="option">--encoding</code>.76   More details can be found in <a class="xref" href="multibyte.html" title="24.3. Character Set Support">Section 24.3</a>.77  </p></div><div class="refsect1" id="id-1.9.5.3.6"><h2>Options</h2><p>78    </p><div class="variablelist"><dl class="variablelist"><dt id="APP-INITDB-OPTION-AUTH"><span class="term"><code class="option">-A <em class="replaceable"><code>authmethod</code></em></code><br /></span><span class="term"><code class="option">--auth=<em class="replaceable"><code>authmethod</code></em></code></span> <a href="#APP-INITDB-OPTION-AUTH" class="id_link">#</a></dt><dd><p>79        This option specifies the default authentication method for local80        users used in <code class="filename">pg_hba.conf</code> (<code class="literal">host</code>81        and <code class="literal">local</code> lines).  See <a class="xref" href="auth-pg-hba-conf.html" title="21.1. The pg_hba.conf File">Section 21.1</a>82        for an overview of valid values.83       </p><p>84        <code class="command">initdb</code> will85        prepopulate <code class="filename">pg_hba.conf</code> entries using the86        specified authentication method for non-replication as well as87        replication connections.88       </p><p>89        Do not use <code class="literal">trust</code> unless you trust all local users on your90        system.  <code class="literal">trust</code> is the default for ease of installation.91       </p></dd><dt id="APP-INITDB-OPTION-AUTH-HOST"><span class="term"><code class="option">--auth-host=<em class="replaceable"><code>authmethod</code></em></code></span> <a href="#APP-INITDB-OPTION-AUTH-HOST" class="id_link">#</a></dt><dd><p>92        This option specifies the authentication method for local users via93        TCP/IP connections used in <code class="filename">pg_hba.conf</code>94        (<code class="literal">host</code> lines).95       </p></dd><dt id="APP-INITDB-OPTION-AUTH-LOCAL"><span class="term"><code class="option">--auth-local=<em class="replaceable"><code>authmethod</code></em></code></span> <a href="#APP-INITDB-OPTION-AUTH-LOCAL" class="id_link">#</a></dt><dd><p>96        This option specifies the authentication method for local users via97        Unix-domain socket connections used in <code class="filename">pg_hba.conf</code>98        (<code class="literal">local</code> lines).99       </p></dd><dt id="APP-INITDB-OPTION-PGDATA"><span class="term"><code class="option">-D <em class="replaceable"><code>directory</code></em></code><br /></span><span class="term"><code class="option">--pgdata=<em class="replaceable"><code>directory</code></em></code></span> <a href="#APP-INITDB-OPTION-PGDATA" class="id_link">#</a></dt><dd><p>100        This option specifies the directory where the database cluster101        should be stored. This is the only information required by102        <code class="command">initdb</code>, but you can avoid writing it by103        setting the <code class="envar">PGDATA</code> environment variable, which104        can be convenient since the database server105        (<code class="command">postgres</code>) can find the data106        directory later by the same variable.107       </p></dd><dt id="APP-INITDB-OPTION-ENCODING"><span class="term"><code class="option">-E <em class="replaceable"><code>encoding</code></em></code><br /></span><span class="term"><code class="option">--encoding=<em class="replaceable"><code>encoding</code></em></code></span> <a href="#APP-INITDB-OPTION-ENCODING" class="id_link">#</a></dt><dd><p>108        Selects the encoding of the template databases. This will also be the109        default encoding of any database you create later, unless you override110        it then. The character sets supported by the111        <span class="productname">PostgreSQL</span> 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>.112       </p><p>113        By default, the template database encoding is derived from the114        locale. If <a class="xref" href="app-initdb.html#APP-INITDB-OPTION-NO-LOCALE"><code class="option">--no-locale</code></a> is specified115        (or equivalently, if the locale is <code class="literal">C</code> or116        <code class="literal">POSIX</code>), then the default is <code class="literal">UTF8</code>117        for the ICU provider and <code class="literal">SQL_ASCII</code> for the118        <code class="literal">libc</code> provider.119       </p></dd><dt id="APP-INITDB-ALLOW-GROUP-ACCESS"><span class="term"><code class="option">-g</code><br /></span><span class="term"><code class="option">--allow-group-access</code></span> <a href="#APP-INITDB-ALLOW-GROUP-ACCESS" class="id_link">#</a></dt><dd><p>120        Allows users in the same group as the cluster owner to read all cluster121        files created by <code class="command">initdb</code>.  This option is ignored122        on <span class="productname">Windows</span> as it does not support123        <acronym class="acronym">POSIX</acronym>-style group permissions.124       </p></dd><dt id="APP-INITDB-ICU-LOCALE"><span class="term"><code class="option">--icu-locale=<em class="replaceable"><code>locale</code></em></code></span> <a href="#APP-INITDB-ICU-LOCALE" class="id_link">#</a></dt><dd><p>125        Specifies the ICU locale when the ICU provider is used. Locale support126        is described in <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a>.127       </p></dd><dt id="APP-INITDB-ICU-RULES"><span class="term"><code class="option">--icu-rules=<em class="replaceable"><code>rules</code></em></code></span> <a href="#APP-INITDB-ICU-RULES" class="id_link">#</a></dt><dd><p>128        Specifies additional collation rules to customize the behavior of the129        default collation.  This is supported for ICU only.130       </p></dd><dt id="APP-INITDB-DATA-CHECKSUMS"><span class="term"><code class="option">-k</code><br /></span><span class="term"><code class="option">--data-checksums</code></span> <a href="#APP-INITDB-DATA-CHECKSUMS" class="id_link">#</a></dt><dd><p>131        Use checksums on data pages to help detect corruption by the132        I/O system that would otherwise be silent. Enabling checksums133        may incur a noticeable performance penalty. If set, checksums134        are calculated for all objects, in all databases. All checksum135        failures will be reported in the136        <a class="link" href="monitoring-stats.html#MONITORING-PG-STAT-DATABASE-VIEW" title="28.2.16. pg_stat_database">137        <code class="structname">pg_stat_database</code></a> view.138        See <a class="xref" href="checksums.html" title="30.2. Data Checksums">Section 30.2</a> for details.139       </p></dd><dt id="APP-INITDB-OPTION-LOCALE"><span class="term"><code class="option">--locale=<em class="replaceable"><code>locale</code></em></code></span> <a href="#APP-INITDB-OPTION-LOCALE" class="id_link">#</a></dt><dd><p>140        Sets the default locale for the database cluster.  If this141        option is not specified, the locale is inherited from the142        environment that <code class="command">initdb</code> runs in. Locale143        support is described in <a class="xref" href="locale.html" title="24.1. Locale Support">Section 24.1</a>.144       </p></dd><dt id="APP-INITDB-OPTION-LC-COLLATE"><span class="term"><code class="option">--lc-collate=<em class="replaceable"><code>locale</code></em></code><br /></span><span class="term"><code class="option">--lc-ctype=<em class="replaceable"><code>locale</code></em></code><br /></span><span class="term"><code class="option">--lc-messages=<em class="replaceable"><code>locale</code></em></code><br /></span><span class="term"><code class="option">--lc-monetary=<em class="replaceable"><code>locale</code></em></code><br /></span><span class="term"><code class="option">--lc-numeric=<em class="replaceable"><code>locale</code></em></code><br /></span><span class="term"><code class="option">--lc-time=<em class="replaceable"><code>locale</code></em></code></span> <a href="#APP-INITDB-OPTION-LC-COLLATE" class="id_link">#</a></dt><dd><p>145        Like <code class="option">--locale</code>, but only sets the locale in146        the specified category.147       </p></dd><dt id="APP-INITDB-OPTION-NO-LOCALE"><span class="term"><code class="option">--no-locale</code></span> <a href="#APP-INITDB-OPTION-NO-LOCALE" class="id_link">#</a></dt><dd><p>148        Equivalent to <code class="option">--locale=C</code>.149       </p></dd><dt id="APP-INITDB-OPTION-LOCALE-PROVIDER"><span class="term"><code class="option">--locale-provider={<code class="literal">libc</code>|<code class="literal">icu</code>}</code></span> <a href="#APP-INITDB-OPTION-LOCALE-PROVIDER" class="id_link">#</a></dt><dd><p>150        This option sets the locale provider for databases created in the new151        cluster.  It can be overridden in the <code class="command">CREATE152        DATABASE</code> command when new databases are subsequently153        created.  The default is <code class="literal">libc</code> (see <a class="xref" href="locale.html#LOCALE-PROVIDERS" title="24.1.4. Locale Providers">Section 24.1.4</a>).154       </p></dd><dt id="APP-INITDB-OPTION-NO-SYNC"><span class="term"><code class="option">-N</code><br /></span><span class="term"><code class="option">--no-sync</code></span> <a href="#APP-INITDB-OPTION-NO-SYNC" class="id_link">#</a></dt><dd><p>155        By default, <code class="command">initdb</code> will wait for all files to be156        written safely to disk.  This option causes <code class="command">initdb</code>157        to return without waiting, which is faster, but means that a158        subsequent operating system crash can leave the data directory159        corrupt.  Generally, this option is useful for testing, but should not160        be used when creating a production installation.161       </p></dd><dt id="APP-INITDB-OPTION-NO-INSTRUCTIONS"><span class="term"><code class="option">--no-instructions</code></span> <a href="#APP-INITDB-OPTION-NO-INSTRUCTIONS" class="id_link">#</a></dt><dd><p>162        By default, <code class="command">initdb</code> will write instructions for how163        to start the cluster at the end of its output. This option causes164        those instructions to be left out. This is primarily intended for use165        by tools that wrap <code class="command">initdb</code> in platform-specific166        behavior, where those instructions are likely to be incorrect.167       </p></dd><dt id="APP-INITDB-OPTION-PWFILE"><span class="term"><code class="option">--pwfile=<em class="replaceable"><code>filename</code></em></code></span> <a href="#APP-INITDB-OPTION-PWFILE" class="id_link">#</a></dt><dd><p>168        Makes <code class="command">initdb</code> read the bootstrap superuser's password169        from a file.  The first line of the file is taken as the password.170       </p></dd><dt id="APP-INITDB-OPTION-SYNC-ONLY"><span class="term"><code class="option">-S</code><br /></span><span class="term"><code class="option">--sync-only</code></span> <a href="#APP-INITDB-OPTION-SYNC-ONLY" class="id_link">#</a></dt><dd><p>171        Safely write all database files to disk and exit.  This does not172        perform any of the normal <span class="application">initdb</span> operations.173        Generally, this option is useful for ensuring reliable recovery after174        changing <a class="xref" href="runtime-config-wal.html#GUC-FSYNC">fsync</a> from <code class="literal">off</code> to175        <code class="literal">on</code>.176       </p></dd><dt id="APP-INITDB-OPTION-TEXT-SEARCH-CONFIG"><span class="term"><code class="option">-T <em class="replaceable"><code>config</code></em></code><br /></span><span class="term"><code class="option">--text-search-config=<em class="replaceable"><code>config</code></em></code></span> <a href="#APP-INITDB-OPTION-TEXT-SEARCH-CONFIG" class="id_link">#</a></dt><dd><p>177        Sets the default text search configuration.178        See <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TEXT-SEARCH-CONFIG">default_text_search_config</a> for further information.179       </p></dd><dt id="APP-INITDB-OPTION-USERNAME"><span class="term"><code class="option">-U <em class="replaceable"><code>username</code></em></code><br /></span><span class="term"><code class="option">--username=<em class="replaceable"><code>username</code></em></code></span> <a href="#APP-INITDB-OPTION-USERNAME" class="id_link">#</a></dt><dd><p>180        Sets the user name of the181        <a class="glossterm" href="glossary.html#GLOSSARY-BOOTSTRAP-SUPERUSER"><em class="glossterm"><a class="glossterm" href="glossary.html#GLOSSARY-BOOTSTRAP-SUPERUSER" title="Bootstrap superuser">bootstrap superuser</a></em></a>.182        This defaults to the name of the operating-system user running183        <code class="command">initdb</code>.184       </p></dd><dt id="APP-INITDB-OPTION-PWPROMPT"><span class="term"><code class="option">-W</code><br /></span><span class="term"><code class="option">--pwprompt</code></span> <a href="#APP-INITDB-OPTION-PWPROMPT" class="id_link">#</a></dt><dd><p>185        Makes <code class="command">initdb</code> prompt for a password186        to give the bootstrap superuser. If you don't plan on using password187        authentication, this is not important.  Otherwise you won't be188        able to use password authentication until you have a password189        set up.190       </p></dd><dt id="APP-INITDB-OPTION-WALDIR"><span class="term"><code class="option">-X <em class="replaceable"><code>directory</code></em></code><br /></span><span class="term"><code class="option">--waldir=<em class="replaceable"><code>directory</code></em></code></span> <a href="#APP-INITDB-OPTION-WALDIR" class="id_link">#</a></dt><dd><p>191        This option specifies the directory where the write-ahead log192        should be stored.193       </p></dd><dt id="APP-INITDB-OPTION-WAL-SEGSIZE"><span class="term"><code class="option">--wal-segsize=<em class="replaceable"><code>size</code></em></code></span> <a href="#APP-INITDB-OPTION-WAL-SEGSIZE" class="id_link">#</a></dt><dd><p>194        Set the <em class="firstterm">WAL segment size</em>, in megabytes.  This195        is the size of each individual file in the WAL log.  The default size196        is 16 megabytes.  The value must be a power of 2 between 1 and 1024197        (megabytes).  This option can only be set during initialization, and198        cannot be changed later.199       </p><p>200        It may be useful to adjust this size to control the granularity of201        WAL log shipping or archiving.  Also, in databases with a high volume202        of WAL, the sheer number of WAL files per directory can become a203        performance and management problem.  Increasing the WAL file size204        will reduce the number of WAL files.205       </p></dd></dl></div><p>206   </p><p>207    Other, less commonly used, options are also available:208 209    </p><div class="variablelist"><dl class="variablelist"><dt id="APP-INITDB-OPTION-SET"><span class="term"><code class="option">-c <em class="replaceable"><code>name</code></em>=<em class="replaceable"><code>value</code></em></code><br /></span><span class="term"><code class="option">--set <em class="replaceable"><code>name</code></em>=<em class="replaceable"><code>value</code></em></code></span> <a href="#APP-INITDB-OPTION-SET" class="id_link">#</a></dt><dd><p>210        Forcibly set the server parameter <em class="replaceable"><code>name</code></em>211        to <em class="replaceable"><code>value</code></em> during <code class="command">initdb</code>,212        and also install that setting in the213        generated <code class="filename">postgresql.conf</code> file,214        so that it will apply during future server runs.215        This option can be given more than once to set several parameters.216        It is primarily useful when the environment is such that the server217        will not start at all using the default parameters.218       </p></dd><dt id="APP-INITDB-OPTION-DEBUG"><span class="term"><code class="option">-d</code><br /></span><span class="term"><code class="option">--debug</code></span> <a href="#APP-INITDB-OPTION-DEBUG" class="id_link">#</a></dt><dd><p>219        Print debugging output from the bootstrap backend and a few other220        messages of lesser interest for the general public.221        The bootstrap backend is the program <code class="command">initdb</code>222        uses to create the catalog tables.  This option generates a tremendous223        amount of extremely boring output.224       </p></dd><dt id="APP-INITDB-OPTION-DISCARD-CACHES"><span class="term"><code class="option">--discard-caches</code></span> <a href="#APP-INITDB-OPTION-DISCARD-CACHES" class="id_link">#</a></dt><dd><p>225        Run the bootstrap backend with the226        <code class="literal">debug_discard_caches=1</code> option.227        This takes a very long time and is only of use for deep debugging.228       </p></dd><dt id="APP-INITDB-OPTION-L"><span class="term"><code class="option">-L <em class="replaceable"><code>directory</code></em></code></span> <a href="#APP-INITDB-OPTION-L" class="id_link">#</a></dt><dd><p>229        Specifies where <code class="command">initdb</code> should find230        its input files to initialize the database cluster.  This is231        normally not necessary.  You will be told if you need to232        specify their location explicitly.233       </p></dd><dt id="APP-INITDB-OPTION-NO-CLEAN"><span class="term"><code class="option">-n</code><br /></span><span class="term"><code class="option">--no-clean</code></span> <a href="#APP-INITDB-OPTION-NO-CLEAN" class="id_link">#</a></dt><dd><p>234        By default, when <code class="command">initdb</code>235        determines that an error prevented it from completely creating the database236        cluster, it removes any files it might have created before discovering237        that it cannot finish the job. This option inhibits tidying-up and is238        thus useful for debugging.239       </p></dd></dl></div><p>240   </p><p>241    Other options:242 243    </p><div class="variablelist"><dl class="variablelist"><dt id="APP-INITDB-OPTION-VERSION"><span class="term"><code class="option">-V</code><br /></span><span class="term"><code class="option">--version</code></span> <a href="#APP-INITDB-OPTION-VERSION" class="id_link">#</a></dt><dd><p>244       Print the <span class="application">initdb</span> version and exit.245       </p></dd><dt id="APP-INITDB-OPTION-HELP"><span class="term"><code class="option">-?</code><br /></span><span class="term"><code class="option">--help</code></span> <a href="#APP-INITDB-OPTION-HELP" class="id_link">#</a></dt><dd><p>246       Show help about <span class="application">initdb</span> command line247       arguments, and exit.248       </p></dd></dl></div><p>249   </p></div><div class="refsect1" id="id-1.9.5.3.7"><h2>Environment</h2><div class="variablelist"><dl class="variablelist"><dt id="APP-INITDB-ENVIRONMENT-PGDATA"><span class="term"><code class="envar">PGDATA</code></span> <a href="#APP-INITDB-ENVIRONMENT-PGDATA" class="id_link">#</a></dt><dd><p>250      Specifies the directory where the database cluster is to be251      stored; can be overridden using the <code class="option">-D</code> option.252     </p></dd><dt id="APP-INITDB-ENVIRONMENT-PG-COLOR"><span class="term"><code class="envar">PG_COLOR</code></span> <a href="#APP-INITDB-ENVIRONMENT-PG-COLOR" class="id_link">#</a></dt><dd><p>253      Specifies whether to use color in diagnostic messages. Possible values254      are <code class="literal">always</code>, <code class="literal">auto</code> and255      <code class="literal">never</code>.256     </p></dd><dt id="APP-INITDB-ENVIRONMENT-TZ"><span class="term"><code class="envar">TZ</code></span> <a href="#APP-INITDB-ENVIRONMENT-TZ" class="id_link">#</a></dt><dd><p>257      Specifies the default time zone of the created database cluster.  The258      value should be a full time zone name259      (see <a class="xref" href="datatype-datetime.html#DATATYPE-TIMEZONES" title="8.5.3. Time Zones">Section 8.5.3</a>).260     </p></dd></dl></div><p>261   This utility, like most other <span class="productname">PostgreSQL</span> utilities,262   also uses the environment variables supported by <span class="application">libpq</span>263   (see <a class="xref" href="libpq-envars.html" title="34.15. Environment Variables">Section 34.15</a>).264  </p></div><div class="refsect1" id="id-1.9.5.3.8"><h2>Notes</h2><p>265   <code class="command">initdb</code> can also be invoked via266   <code class="command">pg_ctl initdb</code>.267  </p></div><div class="refsect1" id="id-1.9.5.3.9"><h2>See Also</h2><span class="simplelist"><a class="xref" href="app-pg-ctl.html" title="pg_ctl"><span class="refentrytitle"><span class="application">pg_ctl</span></span></a>, <a class="xref" href="app-postgres.html" title="postgres"><span class="refentrytitle"><span class="application">postgres</span></span></a>, <a class="xref" href="auth-pg-hba-conf.html" title="21.1. The pg_hba.conf File">Section 21.1</a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="reference-server.html" title="PostgreSQL Server Applications">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-server.html" title="PostgreSQL Server Applications">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pgarchivecleanup.html" title="pg_archivecleanup">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PostgreSQL Server Applications </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"> <span class="application">pg_archivecleanup</span></td></tr></table></div></body></html>
codekingpro/portable-devtools · Team Ai