{"Entry":{"collection":"tool","key":"pg-waldump","name":"pg_waldump","aliases":["pg_waldump"],"metadata":{"aliases":["pg_waldump"],"category":"Server applications","content_hash":"244a748dd1b4f1ec9043b5d77bab3d934e8f6b29496baa73bff6433caf9b4820","imported_at":"2026-09-30T00:40:34.485521+08:00","name":"pg_waldump","name_zh":"","slug":"pg-waldump","summary":"pg_waldump — display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster"}},"Definition":{"Collection":"tool","Key":"pg-waldump","SourceDatabase":"center","Version":"18","SourceTable":"command_tool","SourceKey":"pg-waldump","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","Facts":{"comparison_data":{"environment":[{"description":"Data directory; see also the -p option.","name":"PGDATA"},{"description":"Specifies whether to use color in diagnostic messages. Possible values are always , auto and never .","name":"PG_COLOR"}],"options":[{"description":"Output detailed information about backup blocks.","names":["-b","--bkp-details"],"signature":"-b --bkp-details"},{"description":"Only display records that modify the given block. The relation must also be provided with --relation or -R .","names":["-B block","--block= block"],"signature":"-B block --block= block"},{"description":"Stop reading at the specified WAL location, instead of reading to the end of the log stream.","names":["-e end","--end= end"],"signature":"-e end --end= end"},{"description":"After reaching the end of valid WAL, keep polling once per second for new WAL to appear.","names":["-f","--follow"],"signature":"-f --follow"},{"description":"Only display records that modify blocks in the given fork. The valid values are main for the main fork, fsm for the free space map, vm for the visibility map, and init for the init fork.","names":["-F fork","--fork= fork"],"signature":"-F fork --fork= fork"},{"description":"Display the specified number of records, then stop.","names":["-n limit","--limit= limit"],"signature":"-n limit --limit= limit"},{"description":"Specifies a directory to search for WAL 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 .","names":["-p path","--path= path"],"signature":"-p path --path= path"},{"description":"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.","names":["-q","--quiet"],"signature":"-q --quiet"},{"description":"Only display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If list is passed as name, print a list of valid resource manager names, and exit. 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.","names":["-r rmgr","--rmgr= rmgr"],"signature":"-r rmgr --rmgr= rmgr"},{"description":"Only display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example 1234/12345/12345 . This is the same format used for relations in the program's output.","names":["-R tblspc / db / rel","--relation= tblspc / db / rel"],"signature":"-R tblspc / db / rel --relation= tblspc / db / rel"},{"description":"WAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found.","names":["-s start","--start= start"],"signature":"-s start --start= start"},{"description":"Timeline from which to read WAL records. The default is to use the value in startseg , if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example 17 or 0x11 .","names":["-t timeline","--timeline= timeline"],"signature":"-t timeline --timeline= timeline"},{"description":"Print the pg_waldump version and exit.","names":["-V","--version"],"signature":"-V --version"},{"description":"Only display records that include full page images.","names":["-w","--fullpage"],"signature":"-w --fullpage"},{"description":"Only display records marked with the given transaction ID.","names":["-x xid","--xid= xid"],"signature":"-x xid --xid= xid"},{"description":"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. 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 .","names":["-z","--stats[=record]"],"signature":"-z --stats[=record]"},{"description":"Save full page images found in the WAL records to the save_path directory. The images saved are subject to the same filtering and limiting criteria as the records displayed. The full page images are saved with the following file name format: TIMELINE - LSN . RELTABLESPACE . DATOID . RELNODE . BLKNO _ FORK 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 .","names":["--save-fullpage= save_path"],"signature":"--save-fullpage= save_path"},{"description":"Show help about pg_waldump command line arguments, and exit.","names":["-?","--help"],"signature":"-? --help"}],"synopsis":["pg_waldump [ option ...] [ startseg [ endseg ]]"]},"comparison_hash":"c9b2129ccafda50c4d57561e197e726ab5bfdfe10a6f7d67aa348855b192e3af","description":["pg_waldump — display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster"],"environment":[{"description":"Data directory; see also the -p option.","name":"PGDATA"},{"description":"Specifies whether to use color in diagnostic messages. Possible values are always , auto and never .","name":"PG_COLOR"}],"facts":[{"label":"Documented executable","value":"pg_waldump"},{"label":"Executable version","value":"18.6"},{"label":"Reference inventory","value":"Server applications"},{"label":"Option definition groups","value":"18"}],"manual_html":"\u003cdiv\u003e\u003cdiv class=\"refentry\" id=\"PGWALDUMP\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\u003c/div\u003e\n\u003cdiv class=\"refnamediv\"\u003e\n\u003ch2\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_waldump — display a human-readable rendering of the write-ahead log of a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e database cluster\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsynopsisdiv\"\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv class=\"cmdsynopsis\"\u003e\n\u003cp id=\"id-1.9.5.14.4.1\"\u003e\u003ccode class=\"command\"\u003epg_waldump\u003c/code\u003e [\u003ccode class=\"option\"\u003eoption\u003c/code\u003e...] [\u003ccode class=\"option\"\u003estartseg\u003c/code\u003e [\u003ccode class=\"option\"\u003eendseg\u003c/code\u003e]]\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"R1-APP-PGWALDUMP-1\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003epg_waldump\u003c/code\u003e displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.\u003c/p\u003e\n\u003cp\u003eThis utility can only be run by the user who installed the server, because it requires read-only access to the data directory.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003eThe following command-line options control the location and format of the output:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStart reading at the specified WAL segment file. This implicitly determines the path in which files will be searched for, and the timeline to use.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eendseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop after reading the specified WAL segment file.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--bkp-details\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOutput detailed information about backup blocks.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-B \u003cem class=\"replaceable\"\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--block=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify the given block. The relation must also be provided with \u003ccode class=\"option\"\u003e--relation\u003c/code\u003e or \u003ccode class=\"option\"\u003e-R\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--end=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop reading at the specified WAL location, instead of reading to the end of the log stream.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-f\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--follow\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eAfter reaching the end of valid WAL, keep polling once per second for new WAL to appear.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-F \u003cem class=\"replaceable\"\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--fork=\u003cem class=\"replaceable\"\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given fork. The valid values are \u003ccode class=\"literal\"\u003emain\u003c/code\u003e for the main fork, \u003ccode class=\"literal\"\u003efsm\u003c/code\u003e for the free space map, \u003ccode class=\"literal\"\u003evm\u003c/code\u003e for the visibility map, and \u003ccode class=\"literal\"\u003einit\u003c/code\u003e for the init fork.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-n \u003cem class=\"replaceable\"\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--limit=\u003cem class=\"replaceable\"\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay the specified number of records, then stop.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-p \u003cem class=\"replaceable\"\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--path=\u003cem class=\"replaceable\"\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies a directory to search for WAL segment files or a directory with a \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory that contains such files. The default is to search in the current directory, the \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory of the current directory, and the \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory of \u003ccode class=\"envar\"\u003ePGDATA\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-q\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--quiet\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDo 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-r \u003cem class=\"replaceable\"\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--rmgr=\u003cem class=\"replaceable\"\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If \u003ccode class=\"literal\"\u003elist\u003c/code\u003e is passed as name, print a list of valid resource manager names, and exit.\u003c/p\u003e\n\u003cp\u003eExtensions may define custom resource managers, but \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e 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 \u003ccode class=\"literal\"\u003ecustom###\u003c/code\u003e where \u003cem class=\"replaceable\"\u003e\u003ccode\u003e###\u003c/code\u003e\u003c/em\u003e is the three-digit resource manager ID. Names of this form will always be considered valid.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-R \u003cem class=\"replaceable\"\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--relation=\u003cem class=\"replaceable\"\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example \u003ccode class=\"literal\"\u003e1234/12345/12345\u003c/code\u003e. This is the same format used for relations in the program's output.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-s \u003cem class=\"replaceable\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--start=\u003cem class=\"replaceable\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eWAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-t \u003cem class=\"replaceable\"\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--timeline=\u003cem class=\"replaceable\"\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTimeline from which to read WAL records. The default is to use the value in \u003cem class=\"replaceable\"\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e, if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example \u003ccode class=\"literal\"\u003e17\u003c/code\u003e or \u003ccode class=\"literal\"\u003e0x11\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-w\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--fullpage\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that include full page images.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-x \u003cem class=\"replaceable\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--xid=\u003cem class=\"replaceable\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records marked with the given transaction ID.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-z\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--stats[=record]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay summary statistics (number and size of records and full-page images) instead of individual records. Optionally generate statistics per-record instead of per-rmgr.\u003c/p\u003e\n\u003cp\u003eIf \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e is terminated by signal \u003cspan class=\"systemitem\"\u003eSIGINT\u003c/span\u003e (\u003cspan class=\"keycap\"\u003e\u003cstrong\u003eControl\u003c/strong\u003e\u003c/span\u003e+\u003cspan class=\"keycap\"\u003e\u003cstrong\u003eC\u003c/strong\u003e\u003c/span\u003e), the summary of the statistics computed is displayed up to the termination point. This operation is not supported on \u003cspan class=\"productname\"\u003eWindows\u003c/span\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--save-fullpage=\u003cem class=\"replaceable\"\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSave full page images found in the WAL records to the \u003cem class=\"replaceable\"\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e directory. The images saved are subject to the same filtering and limiting criteria as the records displayed.\u003c/p\u003e\n\u003cp\u003eThe full page images are saved with the following file name format: \u003ccode class=\"literal\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eTIMELINE\u003c/code\u003e\u003c/em\u003e-\u003cem class=\"replaceable\"\u003e\u003ccode\u003eLSN\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eRELTABLESPACE\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eDATOID\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eRELNODE\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eBLKNO\u003c/code\u003e\u003c/em\u003e_\u003cem class=\"replaceable\"\u003e\u003ccode\u003eFORK\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e The file names are composed of the following parts:\u003c/p\u003e\n\u003cdiv class=\"informaltable\"\u003e\n\u003ctable class=\"informaltable\"\u003e\n\n\n\n\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eComponent\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eTIMELINE\u003c/td\u003e\n\u003ctd\u003eThe timeline of the WAL segment file where the record is located formatted as one 8-character hexadecimal number \u003ccode class=\"literal\"\u003e%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLSN\u003c/td\u003e\n\u003ctd\u003eThe LSN of the record with this image, formatted as two 8-character hexadecimal numbers \u003ccode class=\"literal\"\u003e%08X-%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELTABLESPACE\u003c/td\u003e\n\u003ctd\u003etablespace OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDATOID\u003c/td\u003e\n\u003ctd\u003edatabase OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELNODE\u003c/td\u003e\n\u003ctd\u003efilenode of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBLKNO\u003c/td\u003e\n\u003ctd\u003eblock number of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eFORK\u003c/td\u003e\n\u003ctd\u003eThe name of the fork the full page image came from, such as \u003ccode class=\"literal\"\u003emain\u003c/code\u003e, \u003ccode class=\"literal\"\u003efsm\u003c/code\u003e, \u003ccode class=\"literal\"\u003evm\u003c/code\u003e, or \u003ccode class=\"literal\"\u003einit\u003c/code\u003e.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"envar\"\u003ePGDATA\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eData directory; see also the \u003ccode class=\"option\"\u003e-p\u003c/code\u003e option.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"envar\"\u003ePG_COLOR\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies whether to use color in diagnostic messages. Possible values are \u003ccode class=\"literal\"\u003ealways\u003c/code\u003e, \u003ccode class=\"literal\"\u003eauto\u003c/code\u003e and \u003ccode class=\"literal\"\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003eCan give wrong results when the server is running.\u003c/p\u003e\n\u003cp\u003eOnly the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored.\u003c/p\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e cannot read WAL files with suffix \u003ccode class=\"literal\"\u003e.partial\u003c/code\u003e. If those files need to be read, \u003ccode class=\"literal\"\u003e.partial\u003c/code\u003e suffix needs to be removed from the file name.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.9\"\u003e\n\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/docs/18/wal-internals.html\" title=\"28.6. WAL Internals\"\u003eSection 28.6\u003c/a\u003e\u003c/span\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","manual_path":"pgwaldump.html","options":[{"description":"Output detailed information about backup blocks.","names":["-b","--bkp-details"],"signature":"-b --bkp-details","source_url":"/docs/18/pgwaldump.html","summary":"Output detailed information about backup blocks."},{"description":"Only display records that modify the given block. The relation must also be provided with --relation or -R .","names":["-B block","--block= block"],"signature":"-B block --block= block","source_url":"/docs/18/pgwaldump.html","summary":"Only display records that modify the given block. The relation must also be provided with --relation or -R ."},{"description":"Stop reading at the specified WAL location, instead of reading to the end of the log stream.","names":["-e end","--end= end"],"signature":"-e end --end= end","source_url":"/docs/18/pgwaldump.html","summary":"Stop reading at the specified WAL location, instead of reading to the end of the log stream."},{"description":"After reaching the end of valid WAL, keep polling once per second for new WAL to appear.","names":["-f","--follow"],"signature":"-f --follow","source_url":"/docs/18/pgwaldump.html","summary":"After reaching the end of valid WAL, keep polling once per second for new WAL to appear."},{"description":"Only display records that modify blocks in the given fork. The valid values are main for the main fork, fsm for the free space map, vm for the visibility map, and init for the init fork.","names":["-F fork","--fork= fork"],"signature":"-F fork --fork= fork","source_url":"/docs/18/pgwaldump.html","summary":"Only display records that modify blocks in the given fork. The valid values are main for the main fork, fsm for the free space map, vm for the visibility map, and init for the init fork."},{"description":"Display the specified number of records, then stop.","names":["-n limit","--limit= limit"],"signature":"-n limit --limit= limit","source_url":"/docs/18/pgwaldump.html","summary":"Display the specified number of records, then stop."},{"description":"Specifies a directory to search for WAL 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 .","names":["-p path","--path= path"],"signature":"-p path --path= path","source_url":"/docs/18/pgwaldump.html","summary":"Specifies a directory to search for WAL 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 ."},{"description":"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.","names":["-q","--quiet"],"signature":"-q --quiet","source_url":"/docs/18/pgwaldump.html","summary":"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."},{"description":"Only display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If list is passed as name, print a list of valid resource manager names, and exit. 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.","names":["-r rmgr","--rmgr= rmgr"],"signature":"-r rmgr --rmgr= rmgr","source_url":"/docs/18/pgwaldump.html","summary":"Only display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If list is passed as name, print a list of valid resource manager names, and exit."},{"description":"Only display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example 1234/12345/12345 . This is the same format used for relations in the program's output.","names":["-R tblspc / db / rel","--relation= tblspc / db / rel"],"signature":"-R tblspc / db / rel --relation= tblspc / db / rel","source_url":"/docs/18/pgwaldump.html","summary":"Only display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example 1234/12345/12345 . This is the same format used for relations in the program's output."},{"description":"WAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found.","names":["-s start","--start= start"],"signature":"-s start --start= start","source_url":"/docs/18/pgwaldump.html","summary":"WAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found."},{"description":"Timeline from which to read WAL records. The default is to use the value in startseg , if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example 17 or 0x11 .","names":["-t timeline","--timeline= timeline"],"signature":"-t timeline --timeline= timeline","source_url":"/docs/18/pgwaldump.html","summary":"Timeline from which to read WAL records. The default is to use the value in startseg , if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example 17 or 0x11 ."},{"description":"Print the pg_waldump version and exit.","names":["-V","--version"],"signature":"-V --version","source_url":"/docs/18/pgwaldump.html","summary":"Print the pg_waldump version and exit."},{"description":"Only display records that include full page images.","names":["-w","--fullpage"],"signature":"-w --fullpage","source_url":"/docs/18/pgwaldump.html","summary":"Only display records that include full page images."},{"description":"Only display records marked with the given transaction ID.","names":["-x xid","--xid= xid"],"signature":"-x xid --xid= xid","source_url":"/docs/18/pgwaldump.html","summary":"Only display records marked with the given transaction ID."},{"description":"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. 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 .","names":["-z","--stats[=record]"],"signature":"-z --stats[=record]","source_url":"/docs/18/pgwaldump.html","summary":"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."},{"description":"Save full page images found in the WAL records to the save_path directory. The images saved are subject to the same filtering and limiting criteria as the records displayed. The full page images are saved with the following file name format: TIMELINE - LSN . RELTABLESPACE . DATOID . RELNODE . BLKNO _ FORK 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 .","names":["--save-fullpage= save_path"],"signature":"--save-fullpage= save_path","source_url":"/docs/18/pgwaldump.html","summary":"Save full page images found in the WAL records to the save_path directory. The images saved are subject to the same filtering and limiting criteria as the records displayed."},{"description":"Show help about pg_waldump command line arguments, and exit.","names":["-?","--help"],"signature":"-? --help","source_url":"/docs/18/pgwaldump.html","summary":"Show help about pg_waldump command line arguments, and exit."}],"related":[],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"signature":"pg_waldump [ option ...] [ startseg [ endseg ]]","sources":[{"anchor":"","file":"pgwaldump.html","label":"18.6 English manual · pgwaldump.html","sha256":"d2aff15751ec70f6008a13373435b7d58281792955555b6036ef365ac06d24b3","url":"/docs/18/pgwaldump.html"},{"anchor":"","file":"reference-server.html","label":"Server applications inventory","sha256":"e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3","url":"/docs/18/reference-server.html"}],"synopsis":["pg_waldump [ option ...] [ startseg [ endseg ]]"],"tables":[{"columns":[{"key":"signature","label":"Option and arguments"},{"key":"summary","label":"Description"}],"key":"options","rows":[{"signature":{"text":"-b --bkp-details","url":"/docs/18/pgwaldump.html"},"summary":"Output detailed information about backup blocks."},{"signature":{"text":"-B block --block= block","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify the given block. The relation must also be provided with --relation or -R ."},{"signature":{"text":"-e end --end= end","url":"/docs/18/pgwaldump.html"},"summary":"Stop reading at the specified WAL location, instead of reading to the end of the log stream."},{"signature":{"text":"-f --follow","url":"/docs/18/pgwaldump.html"},"summary":"After reaching the end of valid WAL, keep polling once per second for new WAL to appear."},{"signature":{"text":"-F fork --fork= fork","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify blocks in the given fork. The valid values are main for the main fork, fsm for the free space map, vm for the visibility map, and init for the init fork."},{"signature":{"text":"-n limit --limit= limit","url":"/docs/18/pgwaldump.html"},"summary":"Display the specified number of records, then stop."},{"signature":{"text":"-p path --path= path","url":"/docs/18/pgwaldump.html"},"summary":"Specifies a directory to search for WAL 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 ."},{"signature":{"text":"-q --quiet","url":"/docs/18/pgwaldump.html"},"summary":"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."},{"signature":{"text":"-r rmgr --rmgr= rmgr","url":"/docs/18/pgwaldump.html"},"summary":"Only display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If list is passed as name, print a list of valid resource manager names, and exit."},{"signature":{"text":"-R tblspc / db / rel --relation= tblspc / db / rel","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example 1234/12345/12345 . This is the same format used for relations in the program's output."},{"signature":{"text":"-s start --start= start","url":"/docs/18/pgwaldump.html"},"summary":"WAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found."},{"signature":{"text":"-t timeline --timeline= timeline","url":"/docs/18/pgwaldump.html"},"summary":"Timeline from which to read WAL records. The default is to use the value in startseg , if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example 17 or 0x11 ."},{"signature":{"text":"-V --version","url":"/docs/18/pgwaldump.html"},"summary":"Print the pg_waldump version and exit."},{"signature":{"text":"-w --fullpage","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that include full page images."},{"signature":{"text":"-x xid --xid= xid","url":"/docs/18/pgwaldump.html"},"summary":"Only display records marked with the given transaction ID."},{"signature":{"text":"-z --stats[=record]","url":"/docs/18/pgwaldump.html"},"summary":"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."},{"signature":{"text":"--save-fullpage= save_path","url":"/docs/18/pgwaldump.html"},"summary":"Save full page images found in the WAL records to the save_path directory. The images saved are subject to the same filtering and limiting criteria as the records displayed."},{"signature":{"text":"-? --help","url":"/docs/18/pgwaldump.html"},"summary":"Show help about pg_waldump command line arguments, and exit."}],"title":"Documented options"},{"columns":[{"key":"name","label":"Variable"},{"key":"description","label":"Meaning"}],"key":"environment","rows":[{"description":"Data directory; see also the -p option.","name":"PGDATA"},{"description":"Specifies whether to use color in diagnostic messages. Possible values are always , auto and never .","name":"PG_COLOR"}],"title":"Environment variables"}]},"ManualEvidence":{"manual_path":"pgwaldump.html","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"anchor":"","file":"pgwaldump.html","label":"18.6 English manual · pgwaldump.html","sha256":"d2aff15751ec70f6008a13373435b7d58281792955555b6036ef365ac06d24b3","url":"/docs/18/pgwaldump.html"},{"anchor":"","file":"reference-server.html","label":"Server applications inventory","sha256":"e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3","url":"/docs/18/reference-server.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"tool","Key":"pg-waldump","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_waldump","Summary":"pg_waldump — display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster","BodyHTML":"\u003cdiv\u003e\u003cdiv id=\"PGWALDUMP\"\u003e\n\u003cdiv\u003e\u003c/div\u003e\n\u003cdiv\u003e\n\u003ch2\u003e\u003cspan\u003e\u003cspan\u003epg_waldump\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_waldump — display a human-readable rendering of the write-ahead log of a \u003cspan\u003ePostgreSQL\u003c/span\u003e database cluster\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv\u003e\n\u003cp id=\"id-1.9.5.14.4.1\"\u003e\u003ccode\u003epg_waldump\u003c/code\u003e [\u003ccode\u003eoption\u003c/code\u003e...] [\u003ccode\u003estartseg\u003c/code\u003e [\u003ccode\u003eendseg\u003c/code\u003e]]\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"R1-APP-PGWALDUMP-1\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003epg_waldump\u003c/code\u003e displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.\u003c/p\u003e\n\u003cp\u003eThis utility can only be run by the user who installed the server, because it requires read-only access to the data directory.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.14.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003eThe following command-line options control the location and format of the output:\u003c/p\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStart reading at the specified WAL segment file. This implicitly determines the path in which files will be searched for, and the timeline to use.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eendseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop after reading the specified WAL segment file.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--bkp-details\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOutput detailed information about backup blocks.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-B \u003cem\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--block=\u003cem\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify the given block. The relation must also be provided with \u003ccode\u003e--relation\u003c/code\u003e or \u003ccode\u003e-R\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-e \u003cem\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--end=\u003cem\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop reading at the specified WAL location, instead of reading to the end of the log stream.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-f\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--follow\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eAfter reaching the end of valid WAL, keep polling once per second for new WAL to appear.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-F \u003cem\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--fork=\u003cem\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given fork. The valid values are \u003ccode\u003emain\u003c/code\u003e for the main fork, \u003ccode\u003efsm\u003c/code\u003e for the free space map, \u003ccode\u003evm\u003c/code\u003e for the visibility map, and \u003ccode\u003einit\u003c/code\u003e for the init fork.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-n \u003cem\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--limit=\u003cem\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay the specified number of records, then stop.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-p \u003cem\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--path=\u003cem\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies a directory to search for WAL segment files or a directory with a \u003ccode\u003epg_wal\u003c/code\u003e subdirectory that contains such files. The default is to search in the current directory, the \u003ccode\u003epg_wal\u003c/code\u003e subdirectory of the current directory, and the \u003ccode\u003epg_wal\u003c/code\u003e subdirectory of \u003ccode\u003ePGDATA\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-q\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--quiet\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDo 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\u0026#39;t care about the record contents.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-r \u003cem\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--rmgr=\u003cem\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If \u003ccode\u003elist\u003c/code\u003e is passed as name, print a list of valid resource manager names, and exit.\u003c/p\u003e\n\u003cp\u003eExtensions may define custom resource managers, but \u003cspan\u003epg_waldump\u003c/span\u003e 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 \u003ccode\u003ecustom###\u003c/code\u003e where \u003cem\u003e\u003ccode\u003e###\u003c/code\u003e\u003c/em\u003e is the three-digit resource manager ID. Names of this form will always be considered valid.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-R \u003cem\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--relation=\u003cem\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example \u003ccode\u003e1234/12345/12345\u003c/code\u003e. This is the same format used for relations in the program\u0026#39;s output.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-s \u003cem\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--start=\u003cem\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eWAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-t \u003cem\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--timeline=\u003cem\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTimeline from which to read WAL records. The default is to use the value in \u003cem\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e, if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example \u003ccode\u003e17\u003c/code\u003e or \u003ccode\u003e0x11\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan\u003epg_waldump\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-w\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--fullpage\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that include full page images.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-x \u003cem\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--xid=\u003cem\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records marked with the given transaction ID.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-z\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--stats[=record]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay summary statistics (number and size of records and full-page images) instead of individual records. Optionally generate statistics per-record instead of per-rmgr.\u003c/p\u003e\n\u003cp\u003eIf \u003cspan\u003epg_waldump\u003c/span\u003e is terminated by signal \u003cspan\u003eSIGINT\u003c/span\u003e (\u003cspan\u003e\u003cstrong\u003eControl\u003c/strong\u003e\u003c/span\u003e+\u003cspan\u003e\u003cstrong\u003eC\u003c/strong\u003e\u003c/span\u003e), the summary of the statistics computed is displayed up to the termination point. This operation is not supported on \u003cspan\u003eWindows\u003c/span\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e--save-fullpage=\u003cem\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSave full page images found in the WAL records to the \u003cem\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e directory. The images saved are subject to the same filtering and limiting criteria as the records displayed.\u003c/p\u003e\n\u003cp\u003eThe full page images are saved with the following file name format: \u003ccode\u003e\u003cem\u003e\u003ccode\u003eTIMELINE\u003c/code\u003e\u003c/em\u003e-\u003cem\u003e\u003ccode\u003eLSN\u003c/code\u003e\u003c/em\u003e.\u003cem\u003e\u003ccode\u003eRELTABLESPACE\u003c/code\u003e\u003c/em\u003e.\u003cem\u003e\u003ccode\u003eDATOID\u003c/code\u003e\u003c/em\u003e.\u003cem\u003e\u003ccode\u003eRELNODE\u003c/code\u003e\u003c/em\u003e.\u003cem\u003e\u003ccode\u003eBLKNO\u003c/code\u003e\u003c/em\u003e_\u003cem\u003e\u003ccode\u003eFORK\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e The file names are composed of the following parts:\u003c/p\u003e\n\u003cdiv\u003e\n\u003ctable\u003e\n\n\n\n\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eComponent\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eTIMELINE\u003c/td\u003e\n\u003ctd\u003eThe timeline of the WAL segment file where the record is located formatted as one 8-character hexadecimal number \u003ccode\u003e%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLSN\u003c/td\u003e\n\u003ctd\u003eThe LSN of the record with this image, formatted as two 8-character hexadecimal numbers \u003ccode\u003e%08X-%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELTABLESPACE\u003c/td\u003e\n\u003ctd\u003etablespace OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDATOID\u003c/td\u003e\n\u003ctd\u003edatabase OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELNODE\u003c/td\u003e\n\u003ctd\u003efilenode of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBLKNO\u003c/td\u003e\n\u003ctd\u003eblock number of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eFORK\u003c/td\u003e\n\u003ctd\u003eThe name of the fork the full page image came from, such as \u003ccode\u003emain\u003c/code\u003e, \u003ccode\u003efsm\u003c/code\u003e, \u003ccode\u003evm\u003c/code\u003e, or \u003ccode\u003einit\u003c/code\u003e.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan\u003epg_waldump\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.14.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003ePGDATA\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eData directory; see also the \u003ccode\u003e-p\u003c/code\u003e option.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003ePG_COLOR\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies whether to use color in diagnostic messages. Possible values are \u003ccode\u003ealways\u003c/code\u003e, \u003ccode\u003eauto\u003c/code\u003e and \u003ccode\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.14.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003eCan give wrong results when the server is running.\u003c/p\u003e\n\u003cp\u003eOnly the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored.\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003epg_waldump\u003c/span\u003e cannot read WAL files with suffix \u003ccode\u003e.partial\u003c/code\u003e. If those files need to be read, \u003ccode\u003e.partial\u003c/code\u003e suffix needs to be removed from the file name.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.14.9\"\u003e\n\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/docs/18/wal-internals.html\" rel=\"nofollow\"\u003eSection 28.6\u003c/a\u003e\u003c/span\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","ContentHash":"4bf93290d54d31480c9ad405c1f4802e262f3b41d92b56b39d09ea95d5b236ea","Payload":{"description":["pg_waldump — display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster"],"manual_html":"\u003cdiv\u003e\u003cdiv class=\"refentry\" id=\"PGWALDUMP\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\u003c/div\u003e\n\u003cdiv class=\"refnamediv\"\u003e\n\u003ch2\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_waldump — display a human-readable rendering of the write-ahead log of a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e database cluster\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsynopsisdiv\"\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv class=\"cmdsynopsis\"\u003e\n\u003cp id=\"id-1.9.5.14.4.1\"\u003e\u003ccode class=\"command\"\u003epg_waldump\u003c/code\u003e [\u003ccode class=\"option\"\u003eoption\u003c/code\u003e...] [\u003ccode class=\"option\"\u003estartseg\u003c/code\u003e [\u003ccode class=\"option\"\u003eendseg\u003c/code\u003e]]\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"R1-APP-PGWALDUMP-1\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003ccode class=\"command\"\u003epg_waldump\u003c/code\u003e displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.\u003c/p\u003e\n\u003cp\u003eThis utility can only be run by the user who installed the server, because it requires read-only access to the data directory.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003eThe following command-line options control the location and format of the output:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStart reading at the specified WAL segment file. This implicitly determines the path in which files will be searched for, and the timeline to use.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eendseg\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop after reading the specified WAL segment file.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--bkp-details\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOutput detailed information about backup blocks.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-B \u003cem class=\"replaceable\"\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--block=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eblock\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify the given block. The relation must also be provided with \u003ccode class=\"option\"\u003e--relation\u003c/code\u003e or \u003ccode class=\"option\"\u003e-R\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--end=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eend\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eStop reading at the specified WAL location, instead of reading to the end of the log stream.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-f\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--follow\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eAfter reaching the end of valid WAL, keep polling once per second for new WAL to appear.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-F \u003cem class=\"replaceable\"\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--fork=\u003cem class=\"replaceable\"\u003e\u003ccode\u003efork\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given fork. The valid values are \u003ccode class=\"literal\"\u003emain\u003c/code\u003e for the main fork, \u003ccode class=\"literal\"\u003efsm\u003c/code\u003e for the free space map, \u003ccode class=\"literal\"\u003evm\u003c/code\u003e for the visibility map, and \u003ccode class=\"literal\"\u003einit\u003c/code\u003e for the init fork.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-n \u003cem class=\"replaceable\"\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--limit=\u003cem class=\"replaceable\"\u003e\u003ccode\u003elimit\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay the specified number of records, then stop.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-p \u003cem class=\"replaceable\"\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--path=\u003cem class=\"replaceable\"\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies a directory to search for WAL segment files or a directory with a \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory that contains such files. The default is to search in the current directory, the \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory of the current directory, and the \u003ccode class=\"literal\"\u003epg_wal\u003c/code\u003e subdirectory of \u003ccode class=\"envar\"\u003ePGDATA\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-q\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--quiet\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDo 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.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-r \u003cem class=\"replaceable\"\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--rmgr=\u003cem class=\"replaceable\"\u003e\u003ccode\u003ermgr\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If \u003ccode class=\"literal\"\u003elist\u003c/code\u003e is passed as name, print a list of valid resource manager names, and exit.\u003c/p\u003e\n\u003cp\u003eExtensions may define custom resource managers, but \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e 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 \u003ccode class=\"literal\"\u003ecustom###\u003c/code\u003e where \u003cem class=\"replaceable\"\u003e\u003ccode\u003e###\u003c/code\u003e\u003c/em\u003e is the three-digit resource manager ID. Names of this form will always be considered valid.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-R \u003cem class=\"replaceable\"\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--relation=\u003cem class=\"replaceable\"\u003e\u003ccode\u003etblspc\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003edb\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"replaceable\"\u003e\u003ccode\u003erel\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example \u003ccode class=\"literal\"\u003e1234/12345/12345\u003c/code\u003e. This is the same format used for relations in the program's output.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-s \u003cem class=\"replaceable\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--start=\u003cem class=\"replaceable\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eWAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-t \u003cem class=\"replaceable\"\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--timeline=\u003cem class=\"replaceable\"\u003e\u003ccode\u003etimeline\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eTimeline from which to read WAL records. The default is to use the value in \u003cem class=\"replaceable\"\u003e\u003ccode\u003estartseg\u003c/code\u003e\u003c/em\u003e, if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example \u003ccode class=\"literal\"\u003e17\u003c/code\u003e or \u003ccode class=\"literal\"\u003e0x11\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-w\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--fullpage\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records that include full page images.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-x \u003cem class=\"replaceable\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--xid=\u003cem class=\"replaceable\"\u003e\u003ccode\u003exid\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eOnly display records marked with the given transaction ID.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-z\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--stats[=record]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eDisplay summary statistics (number and size of records and full-page images) instead of individual records. Optionally generate statistics per-record instead of per-rmgr.\u003c/p\u003e\n\u003cp\u003eIf \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e is terminated by signal \u003cspan class=\"systemitem\"\u003eSIGINT\u003c/span\u003e (\u003cspan class=\"keycap\"\u003e\u003cstrong\u003eControl\u003c/strong\u003e\u003c/span\u003e+\u003cspan class=\"keycap\"\u003e\u003cstrong\u003eC\u003c/strong\u003e\u003c/span\u003e), the summary of the statistics computed is displayed up to the termination point. This operation is not supported on \u003cspan class=\"productname\"\u003eWindows\u003c/span\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--save-fullpage=\u003cem class=\"replaceable\"\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSave full page images found in the WAL records to the \u003cem class=\"replaceable\"\u003e\u003ccode\u003esave_path\u003c/code\u003e\u003c/em\u003e directory. The images saved are subject to the same filtering and limiting criteria as the records displayed.\u003c/p\u003e\n\u003cp\u003eThe full page images are saved with the following file name format: \u003ccode class=\"literal\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eTIMELINE\u003c/code\u003e\u003c/em\u003e-\u003cem class=\"replaceable\"\u003e\u003ccode\u003eLSN\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eRELTABLESPACE\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eDATOID\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eRELNODE\u003c/code\u003e\u003c/em\u003e.\u003cem class=\"replaceable\"\u003e\u003ccode\u003eBLKNO\u003c/code\u003e\u003c/em\u003e_\u003cem class=\"replaceable\"\u003e\u003ccode\u003eFORK\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e The file names are composed of the following parts:\u003c/p\u003e\n\u003cdiv class=\"informaltable\"\u003e\n\u003ctable class=\"informaltable\"\u003e\n\n\n\n\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eComponent\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eTIMELINE\u003c/td\u003e\n\u003ctd\u003eThe timeline of the WAL segment file where the record is located formatted as one 8-character hexadecimal number \u003ccode class=\"literal\"\u003e%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLSN\u003c/td\u003e\n\u003ctd\u003eThe LSN of the record with this image, formatted as two 8-character hexadecimal numbers \u003ccode class=\"literal\"\u003e%08X-%08X\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELTABLESPACE\u003c/td\u003e\n\u003ctd\u003etablespace OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDATOID\u003c/td\u003e\n\u003ctd\u003edatabase OID of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRELNODE\u003c/td\u003e\n\u003ctd\u003efilenode of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBLKNO\u003c/td\u003e\n\u003ctd\u003eblock number of the block\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eFORK\u003c/td\u003e\n\u003ctd\u003eThe name of the fork the full page image came from, such as \u003ccode class=\"literal\"\u003emain\u003c/code\u003e, \u003ccode class=\"literal\"\u003efsm\u003c/code\u003e, \u003ccode class=\"literal\"\u003evm\u003c/code\u003e, or \u003ccode class=\"literal\"\u003einit\u003c/code\u003e.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"envar\"\u003ePGDATA\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eData directory; see also the \u003ccode class=\"option\"\u003e-p\u003c/code\u003e option.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"envar\"\u003ePG_COLOR\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eSpecifies whether to use color in diagnostic messages. Possible values are \u003ccode class=\"literal\"\u003ealways\u003c/code\u003e, \u003ccode class=\"literal\"\u003eauto\u003c/code\u003e and \u003ccode class=\"literal\"\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003eCan give wrong results when the server is running.\u003c/p\u003e\n\u003cp\u003eOnly the specified timeline is displayed (or the default, if none is specified). Records in other timelines are ignored.\u003c/p\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_waldump\u003c/span\u003e cannot read WAL files with suffix \u003ccode class=\"literal\"\u003e.partial\u003c/code\u003e. If those files need to be read, \u003ccode class=\"literal\"\u003e.partial\u003c/code\u003e suffix needs to be removed from the file name.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.14.9\"\u003e\n\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/docs/18/wal-internals.html\" title=\"28.6. WAL Internals\"\u003eSection 28.6\u003c/a\u003e\u003c/span\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","related":[],"sections":[],"tables":[{"columns":[{"key":"signature","label":"Option and arguments"},{"key":"summary","label":"Description"}],"key":"options","rows":[{"signature":{"text":"-b --bkp-details","url":"/docs/18/pgwaldump.html"},"summary":"Output detailed information about backup blocks."},{"signature":{"text":"-B block --block= block","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify the given block. The relation must also be provided with --relation or -R ."},{"signature":{"text":"-e end --end= end","url":"/docs/18/pgwaldump.html"},"summary":"Stop reading at the specified WAL location, instead of reading to the end of the log stream."},{"signature":{"text":"-f --follow","url":"/docs/18/pgwaldump.html"},"summary":"After reaching the end of valid WAL, keep polling once per second for new WAL to appear."},{"signature":{"text":"-F fork --fork= fork","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify blocks in the given fork. The valid values are main for the main fork, fsm for the free space map, vm for the visibility map, and init for the init fork."},{"signature":{"text":"-n limit --limit= limit","url":"/docs/18/pgwaldump.html"},"summary":"Display the specified number of records, then stop."},{"signature":{"text":"-p path --path= path","url":"/docs/18/pgwaldump.html"},"summary":"Specifies a directory to search for WAL 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 ."},{"signature":{"text":"-q --quiet","url":"/docs/18/pgwaldump.html"},"summary":"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."},{"signature":{"text":"-r rmgr --rmgr= rmgr","url":"/docs/18/pgwaldump.html"},"summary":"Only display records generated by the specified resource manager. You can specify the option multiple times to select multiple resource managers. If list is passed as name, print a list of valid resource manager names, and exit."},{"signature":{"text":"-R tblspc / db / rel --relation= tblspc / db / rel","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that modify blocks in the given relation. The relation is specified with tablespace OID, database OID, and relfilenode separated by slashes, for example 1234/12345/12345 . This is the same format used for relations in the program's output."},{"signature":{"text":"-s start --start= start","url":"/docs/18/pgwaldump.html"},"summary":"WAL location at which to start reading. The default is to start reading the first valid WAL record found in the earliest file found."},{"signature":{"text":"-t timeline --timeline= timeline","url":"/docs/18/pgwaldump.html"},"summary":"Timeline from which to read WAL records. The default is to use the value in startseg , if that is specified; otherwise, the default is 1. The value can be specified in decimal or hexadecimal, for example 17 or 0x11 ."},{"signature":{"text":"-V --version","url":"/docs/18/pgwaldump.html"},"summary":"Print the pg_waldump version and exit."},{"signature":{"text":"-w --fullpage","url":"/docs/18/pgwaldump.html"},"summary":"Only display records that include full page images."},{"signature":{"text":"-x xid --xid= xid","url":"/docs/18/pgwaldump.html"},"summary":"Only display records marked with the given transaction ID."},{"signature":{"text":"-z --stats[=record]","url":"/docs/18/pgwaldump.html"},"summary":"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."},{"signature":{"text":"--save-fullpage= save_path","url":"/docs/18/pgwaldump.html"},"summary":"Save full page images found in the WAL records to the save_path directory. The images saved are subject to the same filtering and limiting criteria as the records displayed."},{"signature":{"text":"-? --help","url":"/docs/18/pgwaldump.html"},"summary":"Show help about pg_waldump command line arguments, and exit."}],"title":"Documented options"},{"columns":[{"key":"name","label":"Variable"},{"key":"description","label":"Meaning"}],"key":"environment","rows":[{"description":"Data directory; see also the -p option.","name":"PGDATA"},{"description":"Specifies whether to use color in diagnostic messages. Possible values are always , auto and never .","name":"PG_COLOR"}],"title":"Environment variables"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
