table of contents
PG_WALDUMP(1) | PostgreSQL 17.0 Documentation | PG_WALDUMP(1) |
NAME¶
pg_waldump - display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster
SYNOPSIS¶
pg_waldump [option...] [startseg [endseg]]
DESCRIPTION¶
pg_waldump displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.
This utility can only be run by the user who installed the server, because it requires read-only access to the data directory.
OPTIONS¶
The following command-line options control the location and format of the output:
startseg
endseg
-b
--bkp-details
-B block
--block=block
-e end
--end=end
-f
--follow
-F fork
--fork=fork
-n limit
--limit=limit
-p path
--path=path
-q
--quiet
-r rmgr
--rmgr=rmgr
Extensions may define custom resource managers, but pg_waldump does not load the extension module and therefore does not recognize custom resource managers by name. Instead, you can specify the custom resource managers as custom### where ### is the three-digit resource manager ID. Names of this form will always be considered valid.
-R
tblspc/db/rel
--relation=tblspc/db/rel
-s start
--start=start
-t timeline
--timeline=timeline
-V
--version
-w
--fullpage
-x xid
--xid=xid
-z
--stats[=record]
If pg_waldump is terminated by signal SIGINT (Control+C), the summary of the statistics computed is displayed up to the termination point. This operation is not supported on Windows.
--save-fullpage=save_path
The full page images are saved with the following file name format: TIMELINE-LSN.RELTABLESPACE.DATOID.RELNODE.BLKNOFORK The file names are composed of the following parts:
Component | Description |
TIMELINE | The timeline of the WAL segment file where the record is located formatted as one 8-character hexadecimal number %08X |
LSN | The LSN of the record with this image, formatted as two 8-character hexadecimal numbers %08X-%08X |
RELTABLESPACE | tablespace OID of the block |
DATOID | database OID of the block |
RELNODE | filenode of the block |
BLKNO | block number of the block |
FORK | The name of the fork the full page image came from, such as _main, _fsm, _vm, or _init. |
-?
--help
ENVIRONMENT¶
PGDATA
PG_COLOR
NOTES¶
Can give wrong results when the server is running.
Only the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored.
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.
SEE ALSO¶
Section 28.6
2024 | PostgreSQL 17.0 |