1PG_WALDUMP(1)            PostgreSQL 13.4 Documentation           PG_WALDUMP(1)
2
3
4

NAME

6       pg_waldump - display a human-readable rendering of the write-ahead log
7       of a PostgreSQL database cluster
8

SYNOPSIS

10       pg_waldump [option...] [startseg [endseg]]
11

DESCRIPTION

13       pg_waldump displays the write-ahead log (WAL) and is mainly useful for
14       debugging or educational purposes.
15
16       This utility can only be run by the user who installed the server,
17       because it requires read-only access to the data directory.
18

OPTIONS

20       The following command-line options control the location and format of
21       the output:
22
23       startseg
24           Start reading at the specified log segment file. This implicitly
25           determines the path in which files will be searched for, and the
26           timeline to use.
27
28       endseg
29           Stop after reading the specified log segment file.
30
31       -b
32       --bkp-details
33           Output detailed information about backup blocks.
34
35       -e end
36       --end=end
37           Stop reading at the specified WAL location, instead of reading to
38           the end of the log stream.
39
40       -f
41       --follow
42           After reaching the end of valid WAL, keep polling once per second
43           for new WAL to appear.
44
45       -n limit
46       --limit=limit
47           Display the specified number of records, then stop.
48
49       -p path
50       --path=path
51           Specifies a directory to search for log segment files or a
52           directory with a pg_wal subdirectory that contains such files. The
53           default is to search in the current directory, the pg_wal
54           subdirectory of the current directory, and the pg_wal subdirectory
55           of PGDATA.
56
57       -q
58       --quiet
59           Do not print any output, except for errors. This option can be
60           useful when you want to know whether a range of WAL records can be
61           successfully parsed but don't care about the record contents.
62
63       -r rmgr
64       --rmgr=rmgr
65           Only display records generated by the specified resource manager.
66           If list is passed as name, print a list of valid resource manager
67           names, and exit.
68
69       -s start
70       --start=start
71           WAL location at which to start reading. The default is to start
72           reading the first valid log record found in the earliest file
73           found.
74
75       -t timeline
76       --timeline=timeline
77           Timeline from which to read log records. The default is to use the
78           value in startseg, if that is specified; otherwise, the default is
79           1.
80
81       -V
82       --version
83           Print the pg_waldump version and exit.
84
85       -x xid
86       --xid=xid
87           Only display records marked with the given transaction ID.
88
89       -z
90       --stats[=record]
91           Display summary statistics (number and size of records and
92           full-page images) instead of individual records. Optionally
93           generate statistics per-record instead of per-rmgr.
94
95       -?
96       --help
97           Show help about pg_waldump command line arguments, and exit.
98

ENVIRONMENT

100       PGDATA
101           Data directory; see also the -p option.
102
103       PG_COLOR
104           Specifies whether to use color in diagnostic messages. Possible
105           values are always, auto and never.
106

NOTES

108       Can give wrong results when the server is running.
109
110       Only the specified timeline is displayed (or the default, if none is
111       specified). Records in other timelines are ignored.
112
113       pg_waldump cannot read WAL files with suffix .partial. If those files
114       need to be read, .partial suffix needs to be removed from the file
115       name.
116

SEE ALSO

118       Section 29.5
119
120
121
122PostgreSQL 13.4                      2021                        PG_WALDUMP(1)
Impressum