forked from tvondra/pg_check
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
51 lines (31 loc) · 1.24 KB
/
README
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
INSTALL
-------
This is a regular extension (9.1) or a contrib module (9.0), so it may be
installed rather easily - do either this
$ make install
$ psql dbname -c "CREATE EXTENSION pg_check"
or this (on 9.0)
$ make install
$ psql dbname < `pg_config --sharedir`/contrib/pg_check--0.1.0.sql
and the extension should be installed.
FUNCTIONS
---------
Currently there are four functions available
* pg_check_table(name, bFrom, bTo) - checks range of blocks for the table
* pg_check_table(name, indexes) - checks the table and all indexes on it
* pg_check_index(name, bFrom, bTo) - checks range of blocks for the index
* pg_check_index(name) - checks the whole index
So if you want to check table "my_table" and all the indexes on it, do this:
db=# SELECT pg_check_table('my_table', true);
and it will print out info about the checks (and return number of issues).
MESSAGES
--------
The functions may print various info about the blocks/tuples, depending on
the client_min_messages level.
WARNING - only info about actual issues
DEBUG1 - info about pages
DEBUG2 - info about tuples on a page
DEBUG3 - info about attributes of a tuple
LICENSE
-------
This software is provided under the BDS license. See LICENSE for details.