Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
pg_waldump
Prev UpPostgres Pro Server ApplicationsHome Next

pg_waldump

pg_waldump — display a human-readable rendering of the write-ahead log of aPostgres Pro 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

Start reading at the specified log segment file. This implicitly determines the path in which files will be searched for, and the timeline to use.

endseg

Stop after reading the specified log segment file.

-b
--bkp-details

Output detailed information about backup blocks.

-eend
--end=end

Stop reading at the specified WAL location, instead of reading to the end of the log stream.

-f
--follow

After reaching the end of valid WAL, keep polling once per second for new WAL to appear.

-nlimit
--limit=limit

Display the specified number of records, then stop.

-ppath
--path=path

Specifies a directory to search for log segment files or a directory with apg_wal subdirectory that contains such files. The default is to search in the current directory, thepg_wal subdirectory of the current directory, and thepg_wal subdirectory ofPGDATA.

-q
--quiet

Do not print any output, except for errors. This option can be useful when you want to know whether a range of WAL records can be successfully parsed but don't care about the record contents.

-rrmgr
--rmgr=rmgr

Only display records generated by the specified resource manager. Iflist is passed as name, print a list of valid resource manager names, and exit.

-sstart
--start=start

WAL location at which to start reading. The default is to start reading the first valid log record found in the earliest file found.

-ttimeline
--timeline=timeline

Timeline from which to read log records. The default is to use the value instartseg, if that is specified; otherwise, the default is 1.

-V
--version

Print thepg_waldump version and exit.

--save-fullpage=save_path

Save full page images found in the WAL records to thesave_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.BLKNOFORK The file names are composed of the following parts:

ComponentDescription
TIMELINEThe timeline of the WAL segment file where the record is located formatted as one 8-character hexadecimal number%08X
LSNTheLSN of the record with this image, formatted as two 8-character hexadecimal numbers%08X-%08X
RELTABLESPACEtablespace OID of the block
DATOIDdatabase OID of the block
RELNODEfilenode of the block
BLKNOblock number of the block
FORK The name of the fork the full page image came from, as of_main,_fsm,_vm, or_init.

-xxid
--xid=xid

Only display records marked with the given transaction ID.

-z
--stats[=record]

Display summary statistics (number and size of records and full-page images) instead of individual records. Optionally generate statistics per-record instead of per-rmgr.

-?
--help

Show help aboutpg_waldump command line arguments, and exit.

Environment

PGDATA

Data directory; see also the-p option.

PG_COLOR

Specifies whether to use color in diagnostic messages. Possible values arealways,auto andnever.

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.


Prev Up Next
pg_upgrade Home postgres
pdfepub
Go to Postgres Pro Standard 13
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp