Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/pgupgrade.sgml`
1179e700c6ac906906e2621905215102faf28334897cdc8a0000000100000fb2
 <term><option>-b</option> <replaceable>bindir</replaceable></term>
      <term><option>--old-bindir=</option><replaceable>bindir</replaceable></term>
      <listitem><para>the old PostgreSQL executable directory;
      environment variable <envar>PGBINOLD</envar></para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-B</option> <replaceable>bindir</replaceable></term>
      <term><option>--new-bindir=</option><replaceable>bindir</replaceable></term>
      <listitem><para>the new PostgreSQL executable directory;
      default is the directory where <application>pg_upgrade</application> resides;
      environment variable <envar>PGBINNEW</envar></para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-c</option></term>
      <term><option>--check</option></term>
      <listitem><para>check clusters only, don't change any data</para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-d</option> <replaceable>configdir</replaceable></term>
      <term><option>--old-datadir=</option><replaceable>configdir</replaceable></term>
      <listitem><para>the old database cluster configuration directory; environment
      variable <envar>PGDATAOLD</envar></para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-D</option> <replaceable>configdir</replaceable></term>
      <term><option>--new-datadir=</option><replaceable>configdir</replaceable></term>
      <listitem><para>the new database cluster configuration directory; environment
      variable <envar>PGDATANEW</envar></para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-j <replaceable class="parameter">njobs</replaceable></option></term>
      <term><option>--jobs=<replaceable class="parameter">njobs</replaceable></option></term>
      <listitem><para>number of simultaneous connections and processes/threads to use
      </para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-k</option></term>
      <term><option>--link</option></term>
      <listitem><para>use hard links instead of copying files to the new
      cluster</para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-N</option></term>
      <term><option>--no-sync</option></term>
      <listitem>
       <para>
        By default, <command>pg_upgrade</command> will wait for all files
        of the upgraded cluster to be written safely to disk.  This option
        causes <command>pg_upgrade</command> to return without waiting, which
        is faster, but means that a subsequent operating system crash can leave
        the data directory corrupt.  Generally, this option is
        useful for testing but should not be used on a production
        installation.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
      <term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>
      <listitem><para>options to be passed directly to the
      old <command>postgres</command> command;  multiple
      option invocations are appended</para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-O</option> <replaceable class="parameter">options</replaceable></term>
      <term><option>--new-options</option> <replaceable class="parameter">options</replaceable></term>
      <listitem><para>options to be passed directly to the
      new <command>postgres</command> command;  multiple
      option invocations are appended</para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-p</option> <replaceable>port</replaceable></term>
      <term><option>--old-port=</option><replaceable>port</replaceable></term>
      <listitem><para>the old cluster port number; environment
      variable <envar>PGPORTOLD</envar></para></listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-P</option>

Title: pg_upgrade Command-Line Options
Summary
This section details the command-line options available for `pg_upgrade`. These options include specifying the old and new PostgreSQL binary and configuration directories (-b, -B, -d, -D), performing a check-only upgrade (-c), setting the number of parallel jobs (-j), using hard links instead of copying files (-k), skipping the synchronization of data to disk (-N), passing custom options to the old and new `postgres` commands (-o, -O), and setting the old cluster port number (-p).