Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/pg_waldump.sgml`
ef172069623cbe10efd775aaa8551c67784139754dd0ef04000000010000096e
 <term><option>--stats[=record]</option></term>
      <listitem>
       <para>
        Display summary statistics (number and size of records and
        full-page images) instead of individual records. Optionally
        generate statistics per-record instead of per-rmgr.
       </para>

       <para>
        If <application>pg_waldump</application> is terminated by signal
        <systemitem>SIGINT</systemitem>
        (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>),
        the summary of the statistics computed is displayed up to the
        termination point. This operation is not supported on
        <productname>Windows</productname>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>--save-fullpage=<replaceable>save_path</replaceable></option></term>
       <listitem>
       <para>
        Save full page images found in the WAL records to the
        <replaceable>save_path</replaceable> directory. The images saved
        are subject to the same filtering and limiting criteria as the
        records displayed.
       </para>
       <para>
        The full page images are saved with the following file name format:
        <literal><replaceable>TIMELINE</replaceable>-<replaceable>LSN</replaceable>.<replaceable>RELTABLESPACE</replaceable>.<replaceable>DATOID</replaceable>.<replaceable>RELNODE</replaceable>.<replaceable>BLKNO</replaceable>_<replaceable>FORK</replaceable></literal>

        The file names are composed of the following parts:
        <informaltable>
         <tgroup cols="2">
          <thead>
           <row>
            <entry>Component</entry>
            <entry>Description</entry>
           </row>
          </thead>

          <tbody>
           <row>
            <entry>TIMELINE</entry>
            <entry>The timeline of the WAL segment file where the record
             is located formatted as one 8-character hexadecimal number
             <literal>%08X</literal></entry>
           </row>

           <row>
            <entry>LSN</entry>
            <entry>The <acronym>LSN</acronym> of the record with this image,
             formatted as two 8-character hexadecimal numbers
             <literal>%08X-%08X</literal></entry>
           </row>

           <row>
            <entry>RELTABLESPACE</entry>
            <entry>tablespace OID of the block</entry>
           </row>

Title: pg_waldump Options: Statistics and Full-Page Image Saving
Summary
This section describes the pg_waldump options for displaying summary statistics and saving full-page images. The `--stats` option shows the number and size of WAL records and full-page images. It can optionally generate statistics per-record. If pg_waldump is interrupted, it displays statistics gathered up to that point (not supported on Windows). The `--save-fullpage` option saves full-page images to a specified directory, subject to the same filtering criteria as displayed records. The filenames of saved images follow a specific format including timeline, LSN, tablespace OID, database OID, relnode, block number and fork.