README
November 11, 2011 ยท View on GitHub
INSTALL
This is a regular extension (9.1) or a contrib module (9.0), so it may be installed rather easily - do either this
psql dbname -c "CREATE EXTENSION pg_check"
or this (on 9.0)
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.