PG_WALDUMP(1)

πŸ“¦ version 14.24, in opensuse-leap 16.0

πŸ’… 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 🧾
  • -e end, --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 πŸ’«
  • -n limit, --limit=limit β€” display the specified number of records, then stop. boundaries! we love them πŸŽ€
  • -p path, --path=path β€” specifies a directory to search for log segment files or a directory with a pg_wal subdirectory that contains such files. the default is to search in the current directory, the pg_wal subdirectory of the current directory, and the pg_wal subdirectory of PGDATA. 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 πŸ’€
  • -r rmgr, --rmgr=rmgr β€” 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. filter queen behavior 🌸
  • -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. no manual setup needed, it just knows ✨
  • -t timeline, --timeline=timeline β€” timeline from which to read log records. the default is to use the value in startseg, if that is specified; otherwise, the default is 1. one timeline and one timeline only, we don't do multiverse here 🌌
  • -V, --version β€” print the pg_waldump version and exit. flex the digits and dip 🫑
  • -x xid, --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 about pg_waldump command line arguments, and exit. the "wait what does this do again" button, no shame πŸ™ˆ

🧚 ENVIRONMENT 🧚

  • PGDATA β€” data directory; see also the -p option. it's the home address of your cluster 🏠
  • PG_COLOR β€” specifies whether to use color in diagnostic messages. possible values are always, auto and never. 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 🌟