PGMONETA-WALINFO(1)
π pgmoneta-walinfo β the manual, but make it make sense
okay so bestie, welcome to pgmoneta-walinfo, section 1 of the manual π this is the page for the little command line icon that reads WAL files and tells you what's in them. grab a snack, we're going in π
β¨ NAME β¨
pgmoneta-walinfo β the command line utility that reads and displays Write-Ahead Log (WAL) files. that's it, that's the whole vibe. no cap. π
(it lives in manual section 1, for the record π§)
π SYNOPSIS π
pgmoneta-walinfo <file|directory|tar_archive>
π¦ DESCRIPTION π¦
pgmoneta-walinfo is a command line utility that reads and displays information about PostgreSQL Write-Ahead Log (WAL) files. she's flexible, okay?? she handles:
- individual WAL files
- directories containing WAL files
- TAR archives (optionally compressed with
.gz,.lz4,.zstd, or.bz2) - encrypted files (
.aes)
and she'll give you the deets on the WAL file in either raw or JSON format β¨
and like, on top of the standard WAL files, pgmoneta-walinfo also supports:
- Encrypted WAL files (
.aes) - Compressed WAL files:
.zstd,.gz,.lz4, and.bz2 - TAR archives containing WAL files (
.tar) - Directories containing WAL files
she's versatile. main character energy, honestly π
β¨ OPTIONS β¨
-I,--interactiveβ interactive mode for WAL files with ncurses (peep the INTERACTIVE MODE section below, iykyk)-c,--configCONFIG_FILE β set the path to thepgmoneta.conffile-u,--usersUSERS_FILE β set the path to thepgmoneta_users.conffile-o,--outputFILE β output file-F,--formatraw|jsonβ set the output format. default israw-L,--logfileFILE β set the log file-q,--quietβ no output, only result π€«--colorβ use colors (on,off)-v,--verboseβ output result-S,--summaryβ show a summary of WAL record counts grouped by resource manager-V,--versionβ display version information-t,--translateβ translate the OIDs in the XLOG records to the corresponding object (database/tablespace/relation) names π«Ά-m,--mappingβ the JSON file that contains the mapping of the OIDs to the corresponding object names-RT,--tablespacesβ filter on tablespaces-RD,--databasesβ filter on databases-RT,--relationsβ filter on relations-R,--filterβ combination of-RT,-RD,-RR-?,--helpβ display help and usage information
ngl bestie, yes,-RTreally does show up twice up there, and yes-Rmentions-RR. that's literally what the page says. I'm not gonna gaslight you, I'm just reporting π«‘
πΈ ARGUMENTS πΈ
<file|directory|tar_archive>β the path to the WAL file, directory containing WAL files, or TAR archive to be analyzed. that's your one job, bestie π
π INTERACTIVE MODE π
with -I (--interactive), pgmoneta-walinfo runs a full-screen ncurses viewer π₯ you can browse WAL records in a table, search, filter, mark rows, and export XIDs for pgmoneta-walfilter. it's giving control room. it's giving main character.
π§ Navigation
- Up / Down β move to previous/next record (at file boundaries, moves to adjacent WAL files in the same directory when applicable)
- PgUp / PgDn β scroll by page
- Home / End β first / last record in the current list
- Enter β open detailed view for the current record
π File browser
- press l to open the file browser
- Up / Down moves between directory entries
- PgUp / PgDn jumps by one visible page in the file browser list
- Enter opens a directory or loads the selected WAL file
- q closes the file browser without loading a file (no accidental commitments π)
π Display
- t β Text mode (human-readable columns)
- b β Binary mode (hex dump)
π Search (separate from filtering, ok??)
- s β open the search dialog (resource manager, LSN fields, XID, description). Tab cycles through known values for RMGR, Start LSN, and End LSN fields
- n / p (or Right / Left when search is active) β next / previous search match; Right / Left can cycle multiple matches in a field
- Esc β clear search highlights and results (does not clear filters, they're separate, keep up π)
π― Filtering
- f β open the filter dialog. criteria you set restrict which rows remain in the list. the dialog is pre-filled with the current rules so you can edit or remove them. Tab cycles through known values for RMGR, Start LSN, and End LSN fields
- u β clear all filters and reload the full record list from the WAL file
- Ctrl+U (in the filter dialog only) β clear all filter fields
π§ Filter semantics
- AND across fields: every non-empty field you set must match (RMGR, Start LSN range, End LSN range, XID, Relation)
- OR within a field: for RMGR, XID, and Relation, you may enter comma-separated values; a record matches if it matches any token in that field
- Start LSN and End LSN in the filter dialog define a range together: the record's start LSN must be greater than or equal to the filter start (if set) and the record's end LSN must be less than or equal to the filter end (if set). if only one bound is set, only that bound applies
π«₯ Visibility
- while filters are active, the header shows a short summary of the rules; the status line shows how many records are shown versus the total loaded (e.g. filtered vs full file)
π Marks and YAML export
- m β mark or unmark the current row (for export)
- g β write a
walfilterYAML file listing XIDs from marked rows (for use withpgmoneta-walfilter) β
π Other
- v β verify records (stub in current viewer)
- l β load a different WAL file or browse directories
- ? β help overlay listing shortcuts
- q β quit (sad, but necessary π)
π USAGE π
to display information about a WAL file in raw format:
pgmoneta-walinfo /path/to/walfile
to display information about a WAL file in interactive mode using ncurses:
pgmoneta-walinfo -I /path/to/walfile
to display information in JSON format:
pgmoneta-walinfo -F json /path/to/walfile
to analyze WAL files from a TAR archive:
pgmoneta-walinfo /path/to/wal_backup.tar.gz
to display information and translate the OIDs to the corresponding object names:
pgmoneta-walinfo -c pgmoneta_walinfo.conf -t -m /path/to/mapping.json /path/to/walfile or pgmoneta-walinfo -c pgmoneta_walinfo.conf -t -u /path/to/pgmoneta_users.conf /path/to/walfile
π OID TRANSLATION π
the -t flag enables translation of WAL record OIDs to object names. use either:
-u /path/to/pgmoneta_users.confto resolve names from a live PostgreSQL server-m /path/to/mapping.jsonto resolve names from a local JSON mapping file
the mapping JSON file must contain tablespaces, databases, and relations sections with object names mapped to OIDs π§
β οΈ and listen β if both mappings and server credentials are supplied, the mapping file takes precedence. so don't come crying when the JSON wins, bestie π
π CREATING THE MAPPING FILE π
the mapping file can be created manually or generated from a PostgreSQL database β¨
each section is an array of objects where the key is the object name and the value is the OID as a string. yes, a string. don't @ me.
Generating from PostgreSQL:
Tablespaces:
SELECT '{' || string_agg('"' || spcname || '": "' || oid || '"', ', ') || '}' FROM pg_tablespace;
Databases:
SELECT '{' || string_agg('"' || datname || '": "' || oid || '"', ', ') || '}' FROM pg_database WHERE datname NOT IN ('template0', 'template1');
Relations:
SELECT '{' || string_agg('"' || nspname || '.' || relname || '": "' || c.oid || '"', ', ') || '}' FROM pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid WHERE c.relkind IN ('r', 'p', 'v', 'm', 'f') AND n.nspname NOT IN ('pg_catalog', 'information_schema');
combine into a JSON file with "tablespaces", "databases", and "relations" arrays. slay π
π REPORTING BUGS π
pgmoneta is maintained on GitHub at https://github.com/pgmoneta/pgmoneta β that's where the bugs live, go tell on them (lovingly) π«Ά
π COPYRIGHT π
pgmoneta-walinfo is licensed under the 3-clause BSD License. iconic, legally speaking.
π SEE ALSO π
pgmoneta.conf(5), pgmoneta(1), pgmoneta-admin(1)
and that's the whole page bestie π the footer just signs it pgmoneta-walinfo() like a little autograph β pgmoneta manual, section 1, that's the source and the version vibe. now go read some WAL files, you absolute queen πβ¨π¦
π¦ where this page comes from
- nixos 26.05: pgmoneta 0.21.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms