pg_filedump — display formatted contents of a Postgres Pro heap, index, or control file
pg_filedump is a utility to format Postgres Pro heap/index/control files into a human-readable form. You can format/dump the files several ways, as listed in the Options section, as well as dump a straight binary. The type of file (heap/index) can usually be determined automatically by the content of the blocks within the file. However, to format a
pg_control file you must use the
-c option. The default is to format the entire file using the block size listed in block 0 and display block relative addresses. These defaults can be modified using run-time options. Some options may seem strange but they are there for a reason. For example, block size. It is there because if the header of block 0 is corrupt, you need a method of forcing a block size.
pg_filedump is provided with Postgres Pro as a separate pre-built package
pg-filedump-std-10 (for the detailed installation instructions, see Chapter 16).
Defaults are: relative addressing, range of the entire file, block size as listed on block 0 in the file.
The following options are valid for heap and index files:
Display absolute addresses when formatting. Block header information is always block-relative.
Display binary block images within a range. The option will turn off all formatting options.
Display formatted block content dump. The option will turn off all other formatting options.
Decode tuples using given comma-separated list of types. The list of supported types:
~— ignore all attributes left in a tuple
Display formatted block content dump along with interpretation.
Display interpreted item details.
Verify block checksums.
Do not dump old values.
Display specific block ranges within the file. Blocks are indexed from 0.
startblock: block to start at.
endblock: block to end at. A
endblockwill format a single block.
Force segment size to
Dump TOAST files.
Output additional information about TOAST relations.
Force segment number to
Force block size to
Force interpreted formatting of block items as index items.
Force interpreted formatting of block items as heap items.
The following options are valid for control files:
Interpret the file listed as a control file.
Display formatted content dump along with interpretation.
Force block size to
Interpret file as
pg_filenode.mapfile and print contents. All other options will be ignored.
In most cases, it is recommended to use the
-f options to get the most useful dump output.