'\" t .\" Title: pg_xlogdump .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 2019 .\" Manual: PostgreSQL 9.6.12 Documentation .\" Source: PostgreSQL 9.6.12 .\" Language: English .\" .TH "PG_XLOGDUMP" "1" "2019" "PostgreSQL 9.6.12" "PostgreSQL 9.6.12 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pg_xlogdump \- display a human\-readable rendering of the write\-ahead log of a PostgreSQL database cluster .SH "SYNOPSIS" .HP \w'\fBpg_xlogdump\fR\ 'u \fBpg_xlogdump\fR [\fBoption\fR...] [\fBstartseg\fR\ [\fBendseg\fR]] .SH "DESCRIPTION" .PP \fBpg_xlogdump\fR displays the write\-ahead log (WAL) and is mainly useful for debugging or educational purposes\&. .PP This utility can only be run by the user who installed the server, because it requires read\-only access to the data directory\&. .SH "OPTIONS" .PP The following command\-line options control the location and format of the output: .PP \fIstartseg\fR .RS 4 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\&. .RE .PP \fIendseg\fR .RS 4 Stop after reading the specified log segment file\&. .RE .PP \fB\-b\fR .br \fB\-\-bkp\-details\fR .RS 4 Output detailed information about backup blocks\&. .RE .PP \fB\-e \fR\fB\fIend\fR\fR .br \fB\-\-end=\fR\fB\fIend\fR\fR .RS 4 Stop reading at the specified log position, instead of reading to the end of the log stream\&. .RE .PP \fB\-f\fR .br \fB\-\-follow\fR .RS 4 After reaching the end of valid WAL, keep polling once per second for new WAL to appear\&. .RE .PP \fB\-n \fR\fB\fIlimit\fR\fR .br \fB\-\-limit=\fR\fB\fIlimit\fR\fR .RS 4 Display the specified number of records, then stop\&. .RE .PP \fB\-p \fR\fB\fIpath\fR\fR .br \fB\-\-path=\fR\fB\fIpath\fR\fR .RS 4 Specifies a directory to search for log segment files or a directory with a pg_xlog subdirectory that contains such files\&. The default is to search in the current directory, the pg_xlog subdirectory of the current directory, and the pg_xlog subdirectory of \fBPGDATA\fR\&. .RE .PP \fB\-r \fR\fB\fIrmgr\fR\fR .br \fB\-\-rmgr=\fR\fB\fIrmgr\fR\fR .RS 4 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\&. .RE .PP \fB\-s \fR\fB\fIstart\fR\fR .br \fB\-\-start=\fR\fB\fIstart\fR\fR .RS 4 Log position at which to start reading\&. The default is to start reading the first valid log record found in the earliest file found\&. .RE .PP \fB\-t \fR\fB\fItimeline\fR\fR .br \fB\-\-timeline=\fR\fB\fItimeline\fR\fR .RS 4 Timeline from which to read log records\&. The default is to use the value in \fIstartseg\fR, if that is specified; otherwise, the default is 1\&. .RE .PP \fB\-V\fR .br \fB\-\-version\fR .RS 4 Print the pg_xlogdump version and exit\&. .RE .PP \fB\-x \fR\fB\fIxid\fR\fR .br \fB\-\-xid=\fR\fB\fIxid\fR\fR .RS 4 Only display records marked with the given transaction ID\&. .RE .PP \fB\-z\fR .br \fB\-\-stats[=record]\fR .RS 4 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\&. .RE .PP \fB\-?\fR .br \fB\-\-help\fR .RS 4 Show help about pg_xlogdump command line arguments, and exit\&. .RE .SH "NOTES" .PP Can give wrong results when the server is running\&. .PP Only the specified timeline is displayed (or the default, if none is specified)\&. Records in other timelines are ignored\&. .PP pg_xlogdump cannot read WAL files with suffix \&.partial\&. If those files need to be read, \&.partial suffix needs to be removed from the file name\&. .SH "SEE ALSO" Section 30.5, \(lqWAL Internals\(rq, in the documentation