1PG_WALDUMP(1)            PostgreSQL 11.3 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       -r rmgr
58       --rmgr=rmgr
59           Only display records generated by the specified resource manager.
60           If list is passed as name, print a list of valid resource manager
61           names, and exit.
62
63       -s start
64       --start=start
65           WAL location at which to start reading. The default is to start
66           reading the first valid log record found in the earliest file
67           found.
68
69       -t timeline
70       --timeline=timeline
71           Timeline from which to read log records. The default is to use the
72           value in startseg, if that is specified; otherwise, the default is
73           1.
74
75       -V
76       --version
77           Print the pg_waldump version and exit.
78
79       -x xid
80       --xid=xid
81           Only display records marked with the given transaction ID.
82
83       -z
84       --stats[=record]
85           Display summary statistics (number and size of records and
86           full-page images) instead of individual records. Optionally
87           generate statistics per-record instead of per-rmgr.
88
89       -?
90       --help
91           Show help about pg_waldump command line arguments, and exit.
92

NOTES

94       Can give wrong results when the server is running.
95
96       Only the specified timeline is displayed (or the default, if none is
97       specified). Records in other timelines are ignored.
98
99       pg_waldump cannot read WAL files with suffix .partial. If those files
100       need to be read, .partial suffix needs to be removed from the file
101       name.
102

SEE ALSO

104       Section 30.5
105
106
107
108PostgreSQL 11.3                      2019                        PG_WALDUMP(1)
Impressum