pg_filedump
pg_filedump — display formatted contents of a Postgres Pro heap, index, or control file
Synopsis
pg_filedump [option...] [file]
Description
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.
Installation
pg_filedump is provided with Postgres Pro Standard as a separate pre-built package pg-filedump-std-13 (for the detailed installation instructions, see Chapter 16).
Options
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:
-aDisplay absolute addresses when formatting. Block header information is always block-relative.
-bDisplay binary block images within a range. The option will turn off all formatting options.
-dDisplay formatted block content dump. The option will turn off all other formatting options.
-DattrlistDecode tuples using given comma-separated list of types. The list of supported types:
bigintbigserialboolcharcharN— char(n)datefloatfloat4float8intjsonmacaddrnamenumericoidrealserialsmallintsmallserialtexttimetimestamptimetzuuidvarcharvarcharN— varchar(n)xidxml~— ignore all attributes left in a tuple-fDisplay formatted block content dump along with interpretation.
-hDisplay help.
-iDisplay interpreted item details.
-kVerify block checksums.
-oDo not dump old values.
-Rstartblock[endblock]Display specific block ranges within the file. Blocks are indexed from 0.
startblock: block to start at.endblock: block to end at. Astartblockwithout anendblockwill format a single block.-ssegsizeForce segment size to
segsize.-tDump TOAST files.
-vOutput additional information about TOAST relations.
-nsegnumberForce segment number to
segnumber.-SblocksizeForce block size to
blocksize.-xForce interpreted formatting of block items as index items.
-yForce interpreted formatting of block items as heap items.
The following options are valid for control files:
-cInterpret the file listed as a control file.
-fDisplay formatted content dump along with interpretation.
-SblocksizeForce block size to
blocksize.
Additional parameters:
-mInterpret file as
pg_filenode.mapfile and print contents. All other options will be ignored.
In most cases, it is recommended to use the -i and -f options to get the most useful dump output.
Author
Patrick Macdonald <patrickm@redhat.com>