File: README.pg_filedump

package info (click to toggle)
postgresql-filedump 9.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 224 kB
  • ctags: 154
  • sloc: ansic: 2,628; makefile: 45; sh: 15
file content (93 lines) | stat: -rw-r--r-- 3,743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
pg_filedump - Display formatted contents of a PostgreSQL heap, index,
              or control file.

Copyright (c) 2002-2010 Red Hat, Inc.
Copyright (c) 2011-2014, PostgreSQL Global Development Group

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Original Author: Patrick Macdonald <patrickm@redhat.com>


------------------------------------------------------------------------
Overview:

pg_filedump is a utility to format PostgreSQL heap/index/control files
into a human-readable form.  You can format/dump the files several ways,
as listed in the Invocation section, as well as dumping 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're there for a reason.  For
example, block size.  It's there because if the header of block 0 is
corrupt, you need a method of forcing a block size.


------------------------------------------------------------------------
Compile/Installation:

To compile pg_filedump, you will need to have a properly configured
PostgreSQL source tree or complete install tree (with include files)
of the appropriate PostgreSQL major version.

There are two makefiles included in this package.  Makefile is a standalone
makefile for pg_filedump.  Alter its PGSQL_INCLUDE_DIR variable to point to
the PostgreSQL include files.  Makefile.contrib can be used if this package
was untarred in the contrib directory of a PostgreSQL build tree.

  make
  make install (if using Makefile.contrib)

It is also possible to use Makefile.contrib without being in the contrib
directory:

  make -f Makefile.contrib USE_PGXS=1

This method requires that the pg_config program be in your PATH, but should
not require any manual adjustments of the Makefile.


------------------------------------------------------------------------
Invocation:

pg_filedump [-abcdfhikxy] [-R startblock [endblock]] [-S blocksize] file

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:
  -a  Display absolute addresses when formatting (Block header
      information is always block relative)
  -b  Display binary block images within a range (Option will turn
      off all formatting options)
  -d  Display formatted block content dump (Option will turn off
      all other formatting options)
  -f  Display formatted block content dump along with interpretation
  -h  Display this information
  -i  Display interpreted item details
  -k  Verify block checksums
  -R  Display specific block ranges within the file (Blocks are
      indexed from 0)
        [startblock]: block to start at
        [endblock]: block to end at
      A startblock without an endblock will format the single block
  -S  Force block size to [blocksize]
  -x  Force interpreted formatting of block items as index items
  -y  Force interpreted formatting of block items as heap items

The following options are valid for control files:
  -c  Interpret the file listed as a control file
  -f  Display formatted content dump along with interpretation
  -S  Force block size to [blocksize]

In most cases it's recommended to use the -i and -f options to get
the most useful dump output.