PG_AMCHECK(1) PostgreSQL 18.6 Documentation PG_AMCHECK(1) (NAME) pg_amcheck - PostgreSQL (SYNOPSIS) pg_amcheck [option...] [dbname] (DESCRIPTION) pg_amcheck amcheck . toast (materialized views) (sequences) btree . . dbname . . . --all --database --exclude-database . --relation --exclude-relation --table --exclude-table --index --exclude-index ( mydb*.myschema*.myrel*) . --schema --exclude-schema ( mydb*.myschema*) . dbname (connection string) . (OPTIONS) : -a --all --exclude-database . -d pattern --database=pattern pattern --exclude-database . . -D pattern --exclude-database=pattern pattern . . -i pattern --index=pattern pattern . . --relation . -I pattern --exclude-index=pattern pattern . . --exclude-relation . -r pattern --relation=pattern pattern . . (unqualified) myrel* (schema-qualified) myschema*.myrel* mydb*.myschema*.myrel*. . -R pattern --exclude-relation=pattern pattern . . --relation pattern . -s pattern --schema=pattern pattern . . --table=SCHEMAPAT.* --no-dependent-indexes . --index=SCHEMAPAT.* . . --schema=mydb*.myschema* myschema* mydb* . -S pattern --exclude-schema=pattern pattern . . --schema . -t pattern --table=pattern pattern . . --relation . -T pattern --exclude-table=pattern pattern . . --exclude-relation . --no-dependent-indexes btree --index --relation . . --no-dependent-toast toast ( ) --table --relation . . --no-strict-names --database --table --index --relation . . : --exclude-toast-pointers toast toast . . --on-error-stop relation . . relation . --skip=option all-frozen all frozen . all-visible all visible . . none . --startblock=block . relation . relation . --endblock . --endblock=block . relation . relation . toast toast toast --exclude-toast-pointers . B-tree : --checkunique checkunique amcheck . --heapallindexed heapallindexed amcheck heap . --parent-check btree bt_index_parent_check amcheck / . bt_index_check amcheck --rootdescend bt_index_parent_check . --rootdescend rootdescend amcheck . --parent-check . btree . . . B-tree --parent-check --rootdescend relation . INSERT UPDATE DELETE . : -h hostname --host=hostname . () (Unix domain socket) . -p port --port=port TCP . -U --username=username . -w --no-password . .pgpass . (batch jobs) . -W --password pg_amcheck . pg_amcheck . pg_amcheck . -W . --maintenance-db=dbname connection string . --all . connection string . postgres template1 . : -e --echo SQL stdout (echo) . -j num --jobs=num num . . -P --progress . . . -v --verbose . . -V --version pg_amcheck . --install-missing --install-missing=schema () . schema pg_catalog . amcheck . -? --help pg_amcheck . (ENVIRONMENT) pg_amcheck PostgreSQL libpq (: 32.15). PG_COLOR . always auto never. (NOTES) pg_amcheck PostgreSQL 14.0 . (SEE ALSO) amcheck PostgreSQL 18.6 2026 PG_AMCHECK(1)