PG_WALDUMP(1)
π
PG_WALDUMP(1) β aka the pg_waldump page from the PostgreSQL 14.24 Documentation gang
ok so bestie, welcome to pg_waldump(1), the little tool that lets you peek at the write-ahead log like it's your ex's finsta. let's get into it π
β¨ NAME β¨
pg_waldump β display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster. yes it's giving translator-for-WAL, and honestly? iconic. πΈ
π¦ SYNOPSIS π¦
pg_waldump [option...] [startseg [endseg]]
π DESCRIPTION π
pg_waldump displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes. like, it's not out here running your production, it's out here teaching you. main character study buddy energy fr fr πβ¨
This utility can only be run by the user who installed the server, because it requires read-only access to the data directory. so no, your cousin's roommate cannot run it. permissions said what they said π
π OPTIONS π
The following command-line options control the location and format of the output. buckle up, there's a lot, and we're listing every single one π«Ά
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. lowkey doing three jobs at once, respect πendsegβ stop after reading the specified log segment file. bye bestie, that's the cutoff πͺ-b,--bkp-detailsβ output detailed information about backup blocks. the receipts, but for backup blocks π§Ύ-eend,--end=end β stop reading at the specified WAL location, instead of reading to the end of the log stream. it's giving "I have somewhere to be" β°-f,--followβ after reaching the end of valid WAL, keep polling once per second for new WAL to appear. obsessed with staying in the loop, honestly π«-nlimit,--limit=limit β display the specified number of records, then stop. boundaries! we love them π-ppath,--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. it's literally a little scavenger hunt π΅οΈββοΈ-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. the "are we good? ok bye" flag, no notes π-rrmgr,--rmgr=rmgr β only display records generated by the specified resource manager. iflistis passed as name, print a list of valid resource manager names, and exit. filter queen behavior πΈ-sstart,--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. no manual setup needed, it just knows β¨-ttimeline,--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. one timeline and one timeline only, we don't do multiverse here π-V,--versionβ print thepg_waldumpversion and exit. flex the digits and dip π«‘-xxid,--xid=xid β only display records marked with the given transaction ID. very "show me only that one" of you π-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. numbers instead of lore, honestly kinda slay π₯-?,--helpβ show help aboutpg_waldumpcommand line arguments, and exit. the "wait what does this do again" button, no shame π
π§ ENVIRONMENT π§
PGDATAβ data directory; see also the-poption. it's the home address of your cluster πPG_COLORβ specifies whether to use color in diagnostic messages. possible values arealways,autoandnever. aesthetic choices, we support them π
π NOTES π
Can give wrong results when the server is running. like, the WAL is actively being written to, so bestie please don't take these results as gospel while the server is up and about π
Only the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored. we're monogamous to one timeline here π
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. no cap, it just refuses β you gotta do the renaming yourself βοΈ
π SEE ALSO π
Section 30.6 β go read it, it's the assigned reading bestie π
and that's the whole page babes π written up by the PostgreSQL 14.24 crew, dated 2026, and pg_waldump(1) is right there in the corner being iconic. now go dump some WAL, iykyk π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14-server 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14-server 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14-server 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14-server 14.24-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