Home Explore Blog CI



postgresql

6th chunk of `doc/src/sgml/ref/pg_resetwal.sgml`
fe90db3de5de1fb65973826d0ed2e544bb84590f5c94b5650000000100000823
 </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-x <replaceable class="parameter">xid</replaceable></option></term>
    <term><option>--next-transaction-id=<replaceable class="parameter">xid</replaceable></option></term>
    <listitem>
     <para>
      Manually set the next transaction ID.
     </para>

     <para>
      A safe value can be determined by looking for the numerically largest
      file name in the directory <filename>pg_xact</filename> under the data directory,
      adding one,
      and then multiplying by 1048576 (0x100000).  Note that the file names are in
      hexadecimal.  It is usually easiest to specify the option value in
      hexadecimal too. For example, if <filename>0011</filename> is the largest entry
      in <filename>pg_xact</filename>, <literal>-x 0x1200000</literal> will work (five
      trailing zeroes provide the proper multiplier).
     </para>
     <!-- 1048576 = SLRU_PAGES_PER_SEGMENT * BLCKSZ * CLOG_XACTS_PER_BYTE -->
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>--char-signedness=<replaceable class="parameter">option</replaceable></option></term>
    <listitem>
     <para>
      Manually set the default char signedness. Possible values are
      <literal>signed</literal> and <literal>unsigned</literal>.
     </para>
     <para>
      For a database cluster that <command>pg_upgrade</command> upgraded from
      a <productname>PostgreSQL</productname> version before 18, the safe
      value would be the default <type>char</type> signedness of the platform
      that ran the cluster before that upgrade. For all other
      clusters, <literal>signed</literal> would be the safe value. However,
      this option is exclusively for use with <command>pg_upgrade</command>
      and should not normally be used manually.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>--wal-segsize=<replaceable class="parameter">wal_segment_size</replaceable></option></term>
    <listitem>
     <para>
      Set the new WAL segment size, in megabytes.

Title: pg_resetwal: More Options (Next Transaction ID, Char Signedness, WAL Segment Size)
Summary
This section of the pg_resetwal documentation details more options, including how to manually set the next transaction ID, how to manually set the default char signedness (for use with pg_upgrade, primarily from versions before 18, where 'signed' is generally safe), and how to set the new WAL segment size in megabytes.