↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Command-line Tools / Server applications

pg_walsummary

pg_walsummary — print contents of WAL summary files

Reading PostgreSQL 18.6.

Description

pg_walsummary — print contents of WAL summary files

Documented executable
pg_walsummary
Executable version
18.6
Reference inventory
Server applications
Option definition groups
4

Usage

pg_walsummary [ option ...] [ file ...]

Documented options

Option and argumentsDescription
-i --individualBy default, pg_walsummary prints one line of output for each range of one or more consecutive modified blocks. This can make the output a lot briefer, since a relation where all blocks from 0 through 999 were modified will produce only one line of output rather than 1000 separate lines. This option requests a separate line of output for every modified block.
-q --quietDo not print any output, except for errors. This can be useful when you want to know whether a WAL summary file can be successfully parsed but don't care about the contents.
-V --versionDisplay version information, then exit.
-? --helpShows help about pg_walsummary command line arguments, and exits.

Manual definition

pg_walsummary

pg_walsummary — print contents of WAL summary files

Synopsis

pg_walsummary [option...] [file...]

Description

pg_walsummary is used to print the contents of WAL summary files. These binary files are found in the pg_wal/summaries 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 incremental backup, but it may be useful for debugging purposes.

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.

Options

-i
--individual

By default, pg_walsummary prints one line of output for each range of one or more consecutive modified blocks. This can make the output a lot briefer, since a relation where all blocks from 0 through 999 were modified will produce only one line of output rather than 1000 separate lines. This option requests a separate line of output for every modified block.

-q
--quiet

Do not print any output, except for errors. This can be useful when you want to know whether a WAL summary file can be successfully parsed but don't care about the contents.

-V
--version

Display version information, then exit.

-?
--help

Shows help about pg_walsummary command line arguments, and exits.

Environment

The environment variable PG_COLOR specifies whether to use color in diagnostic messages. Possible values are always, auto and never.

Documentation and source

Source build
Version
18.6
Build
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
Source fingerprint
ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8

Compare versions

PostgreSQL 16 → 17: added.

--- PostgreSQL 16
+++ PostgreSQL 17
@@ -1 +1,40 @@
-Not recorded in this version
+{
+  "environment": [],
+  "options": [
+    {
+      "description": "By default, pg_walsummary prints one line of output for each range of one or more consecutive modified blocks. This can make the output a lot briefer, since a relation where all blocks from 0 through 999 were modified will produce only one line of output rather than 1000 separate lines. This option requests a separate line of output for every modified block.",
+      "names": [
+        "-i",
+        "--individual"
+      ],
+      "signature": "-i --individual"
+    },
+    {
+      "description": "Do not print any output, except for errors. This can be useful when you want to know whether a WAL summary file can be successfully parsed but don't care about the contents.",
+      "names": [
+        "-q",
+        "--quiet"
+      ],
+      "signature": "-q --quiet"
+    },
+    {
+      "description": "Display version information, then exit.",
+      "names": [
+        "-V",
+        "--version"
+      ],
+      "signature": "-V --version"
+    },
+    {
+      "description": "Shows help about pg_walsummary command line arguments, and exits.",
+      "names": [
+        "-?",
+        "--help"
+      ],
+      "signature": "-? --help"
+    }
+  ],
+  "synopsis": [
+    "pg_walsummary [ option ...] [ file ...]"
+  ]
+}

Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.

Related entries

Export JSON · Back to Command-line Tools · Recorded in PostgreSQL 17 through 20; the first sample is not necessarily its introduction.