PG_WALDUMP(1)
β¨ NAME β¨
Okay bestie, welcome to the PG_WALDUMP(1) manual page β this is all about pg_waldump, which displays a human-readable rendering of the write-ahead log of a PostgreSQL database cluster. It's giving βWAL but make it readableβ energy π
πΈ SYNOPSIS πΈ
pg_waldump [option...] [startseg [endseg]]
π DESCRIPTION π
pg_waldump displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes. No cap, it's the tool you reach for when you wanna peek at WAL records instead of just vibing with mystery bytes π¦
This utility can only be run by the user who installed the server, because it requires read-only access to the data directory. So yeah, permissions matter, bestie β it's not a βrun it as anyoneβ situation π
π OPTIONS π
The following command-line options control the location and format of the output β read 'em and weep, bestie:
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. It's literally picking your starting point β¨endsegβ Stop after reading the specified log segment file. That's the finish line, periodt π-b,--bkp-detailsβ Output detailed information about backup blocks. Backup block lore unlocked π₯-e end,--end=endβ Stop reading at the specified WAL location, instead of reading to the end of the log stream. You set the stop point, bestie π-f,--followβ After reaching the end of valid WAL, keep polling once per second for new WAL to appear. It's giving βwait for itβ¦ wait for itβ¦β energy π-n limit,--limit=limitβ Display the specified number of records, then stop. Snack-sized WAL output π-p path,--path=pathβ Specifies a directory to search for log segment files or a directory with apg_walsubdirectory that contains such files. The default is to search in the current directory, thepg_walsubdirectory of the current directory, and thepg_walsubdirectory ofPGDATA. Path hunting: iconic π-q,--quietβ Do not print any output, except for errors. This option can be useful when you want to know whether a range of WAL records can be successfully parsed but don't care about the record contents. Silent mode, but make it useful π€«-r rmgr,--rmgr=rmgrβ Only display records generated by the specified resource manager. Iflistis passed asname, print a list of valid resource manager names, and exit. Filtered records, filtered vibes π-s start,--start=startβ WAL location at which to start reading. The default is to start reading the first valid log record found in the earliest file found. Choose your beginning, main character style π-t timeline,--timeline=timelineβ Timeline from which to read log records. The default is to use the value instartseg, if that is specified; otherwise, the default is1. Timeline selection is lowkey important π§-V,--versionβ Print thepg_waldumpversion and exit. Version check, slay π-x xid,--xid=xidβ Only display records marked with the given transaction ID. XID filter, activated β-z,--stats[=record]β 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. Stats girlies rise π-?,--helpβ Show help aboutpg_waldumpcommand line arguments, and exit. Help is always a vibe π«Ά
π¦ ENVIRONMENT π¦
PGDATAβ Data directory; see also the-poption. It's the home base of your data π‘PG_COLORβ Specifies whether to use color in diagnostic messages. Possible values arealways,autoandnever. Color choice is a whole personality π
π NOTES π
β οΈ Can give wrong results when the server is running. That's a real heads-up, bestie β don't ignore it π
Only the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored. Timeline boundaries are respected, no crossover drama π«
pg_waldump cannot read WAL files with suffix .partial. If those files need to be read, .partial suffix needs to be removed from the file name. Yep, you gotta rename it β the .partial has to go π
π SEE ALSO π
Section 29.5
Cute sign-off time: this page is from PostgreSQL 13.23, dated 2025. Stay slay, bestie π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13-server 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-server 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-server 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13-server 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms