object: database objects, tables, indexes and sequences
Inventory database objects by schema and inspect tables, indexes, and sequences.
Survey the current database with object (summary), then inspect object table [name], object index [name], or object seq [name]. Repeat --schema to target specific schemas, or --all-schemas to include system schemas. Read-only: never executes VACUUM or DROP INDEX.
Usage
Subcommands & Options
| Command / Option | Effect |
|---|---|
object / object summary | Inventory object counts and estimated size by schema and relation kind |
object table [name] | Rank tables (--by=size|rows|dead|seq_scan, --partitioned) or inspect one table in 6 clues |
object index [name] | Rank indexes (--by=size|scans, --unused, --invalid) or inspect one index |
object seq [name] | Check integer/range exhaustion risk across sequences |
--schema, --all-schemas, --exact | Filter schema scope; opt in to locked/exact pg_table_size within --exact-budget (default 20) |
Verdict & Reading Output
FAIL(exit=2): Exhausted non-cycling sequence (seq.exhausted) with0remaining values; for cached sequences (cache_size > 1), existing backends may continue briefly until their local cache depletes while new allocations already fail.WARN(exit=1): Invalid/unready indexes or autovacuum disabled past dead-tuple threshold (sequences with remaining capacity remain informational until exhausted).UNKNOWN(exit=3):--exactexceeded--exact-budget(marked in[COVERAGE]instead of silent truncation),--unusedrun on a standby (node-local scan counters),object seqmissing privilege on restricted sequences, or incomplete single-table size/index probes.
Example (KES V9 Primary, excerpt, COLUMNS=80)
Related Commands
kbdiag vacuum— current-database dead tuples and autovacuum blockerskbdiag freeze— oldest XID/MXID relation ages and wraparound headroomkbdiag space— total database, WAL, and filesystem capacity