Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/ref/pg_walsummary.sgml`
41250300be9249f41d5d8998d874264a18c3ef4f2aef43560000000100000809
<!--
doc/src/sgml/ref/pg_walsummary.sgml
PostgreSQL documentation
-->

<refentry id="app-pgwalsummary">
 <indexterm zone="app-pgwalsummary">
  <primary>pg_walsummary</primary>
 </indexterm>

 <refmeta>
  <refentrytitle><application>pg_walsummary</application></refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pg_walsummary</refname>
  <refpurpose>print contents of WAL summary files</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_walsummary</command>
   <arg rep="repeat" choice="opt"><replaceable>option</replaceable></arg>
   <arg rep="repeat"><replaceable>file</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>
  <para>
   <application>pg_walsummary</application> is used to print the contents of
   WAL summary files. These binary files are found with the
   <literal>pg_wal/summaries</literal> subdirectory of the data directory,
   and can be converted to text using this tool. This is not ordinarily
   necessary, since WAL summary files primarily exist to support
   <link linkend="backup-incremental-backup">incremental backup</link>,
   but it may be useful for debugging purposes.
  </para>

  <para>
   A WAL summary file is indexed by tablespace OID, relation OID, and relation
   fork. For each relation fork, it stores the list of blocks that were
   modified by WAL within the range summarized in the file. It can also
   store a "limit block," which is 0 if the relation fork was created or
   truncated within the relevant WAL range, and otherwise the shortest length
   to which the relation fork was truncated. If the relation fork was not
   created, deleted, or truncated within the relevant WAL range, the limit
   block is undefined or infinite and will not be printed by this tool.
  </para>
 </refsect1>

 <refsect1>
  <title>Options</title>

   <para>
    <variablelist>
     <varlistentry>
      <term><option>-i</option></term>
      <term><option>--individual</option></term>

Title: pg_walsummary: Printing WAL Summary File Contents
Summary
The pg_walsummary tool is used to display the contents of WAL summary files. These files, located in the pg_wal/summaries subdirectory of the data directory, are primarily used for incremental backups. pg_walsummary indexes the files by tablespace OID, relation OID, and relation fork, storing a list of blocks modified by WAL and a 'limit block' that indicates the shortest truncation length. The tool can be useful for debugging.