Skip to content

hlinnaka/pg_check

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

a tool to verify integrity of PostgreSQL data files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%