Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

pg_xlogdump

Name

pg_xlogdump -- display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster

Synopsis

pg_xlogdump [option...] [startseg [endseg] ]

Description

pg_xlogdump displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.

This utility can only be run by the user who installed the server, because it requires read-only access to the data directory.

Options

The following command-line options control the location and format of the output:

startseg

Start reading at the specified log segment file. This implicitly determines the path in which files will be searched for, and the timeline to use.

endseg

Stop after reading the specified log segment file.

-b
--bkp-details

Output detailed information about backup blocks.

-e end
--end=end

Stop reading at the specified log position, instead of reading to the end of the log stream.

-n limit
--limit=limit

Display the specified number of records, then stop.

-p path
--path=path

Directory in which to find log segment files. The default is to search for them in the pg_xlog subdirectory of the current directory.

-r rmgr
--rmgr=rmgr

Only display records generated by the specified resource manager. If list is passed as name, print a list of valid resource manager names, and exit.

-s start
--start=start

Log position at which to start reading. The default is to start reading the first valid log record found in the earliest file found.

-t timeline
--timeline=timeline

Timeline from which to read log records. The default is to use the value in startseg, if that is specified; otherwise, the default is 1.

-V
--version

Print the pg_xlogdump version and exit.

-x xid
--xid=xid

Only display records marked with the given TransactionId.

-?
--help

Show help about pg_xlogdump command line arguments, and exit.

Notes

Can give wrong results when the server is running.

Only the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored.

See Also

Section 29.5