OS Manuals

/usr/lib/postgresql/15/bin/pg_amcheck

Sidecar image used by the Zalando postgres-operator to take pg_dumpall logical backups and upload them to S3 or GCS

From postgres-operator-fips-logical-backup 2.0.3-r5 (enterprise-packages), captured 2026-11-08 by running pg_amcheck --help (exit 0). permalink

pg_amcheck checks objects in a PostgreSQL database for corruption.

Usage:
  pg_amcheck [OPTION]... [DBNAME]

Target options:
  -a, --all                       check all databases
  -d, --database=PATTERN          check matching database(s)
  -D, --exclude-database=PATTERN  do NOT check matching database(s)
  -i, --index=PATTERN             check matching index(es)
  -I, --exclude-index=PATTERN     do NOT check matching index(es)
  -r, --relation=PATTERN          check matching relation(s)
  -R, --exclude-relation=PATTERN  do NOT check matching relation(s)
  -s, --schema=PATTERN            check matching schema(s)
  -S, --exclude-schema=PATTERN    do NOT check matching schema(s)
  -t, --table=PATTERN             check matching table(s)
  -T, --exclude-table=PATTERN     do NOT check matching table(s)
      --no-dependent-indexes      do NOT expand list of relations to include indexes
      --no-dependent-toast        do NOT expand list of relations to include TOAST tables
      --no-strict-names           do NOT require patterns to match objects

Table checking options:
      --exclude-toast-pointers    do NOT follow relation TOAST pointers
      --on-error-stop             stop checking at end of first corrupt page
      --skip=OPTION               do NOT check "all-frozen" or "all-visible" blocks
      --startblock=BLOCK          begin checking table(s) at the given block number
      --endblock=BLOCK            check table(s) only up to the given block number

B-tree index checking options:
      --heapallindexed            check that all heap tuples are found within indexes
      --parent-check              check index parent/child relationships
      --rootdescend               search from root page to refind tuples

Connection options:
  -h, --host=HOSTNAME             database server host or socket directory
  -p, --port=PORT                 database server port
  -U, --username=USERNAME         user name to connect as
  -w, --no-password               never prompt for password
  -W, --password                  force password prompt
      --maintenance-db=DBNAME     alternate maintenance database

Other options:
  -e, --echo                      show the commands being sent to the server
  -j, --jobs=NUM                  use this many concurrent connections to the server
  -P, --progress                  show progress information
  -v, --verbose                   write a lot of output
  -V, --version                   output version information, then exit
      --install-missing           install missing extensions
  -?, --help                      show this help, then exit

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (35)
OptionDescriptionSource
-a, --allcheck all databaseshelp
-d, --database PATTERNcheck matching database(s)help
-D, --exclude-database PATTERNdo NOT check matching database(s)help
-i, --index PATTERNcheck matching index(es)help
-I, --exclude-index PATTERNdo NOT check matching index(es)help
-r, --relation PATTERNcheck matching relation(s)help
-R, --exclude-relation PATTERNdo NOT check matching relation(s)help
-s, --schema PATTERNcheck matching schema(s)help
-S, --exclude-schema PATTERNdo NOT check matching schema(s)help
-t, --table PATTERNcheck matching table(s)help
-T, --exclude-table PATTERNdo NOT check matching table(s)help
--no-dependent-indexesdo NOT expand list of relations to include indexeshelp
--no-dependent-toastdo NOT expand list of relations to include TOAST tableshelp
--no-strict-namesdo NOT require patterns to match objectshelp
--exclude-toast-pointersdo NOT follow relation TOAST pointershelp
--on-error-stopstop checking at end of first corrupt pagehelp
--skip OPTIONdo NOT check "all-frozen" or "all-visible" blockshelp
--startblock BLOCKbegin checking table(s) at the given block numberhelp
--endblock BLOCKcheck table(s) only up to the given block numberhelp
--heapallindexedcheck that all heap tuples are found within indexeshelp
--parent-checkcheck index parent/child relationshipshelp
--rootdescendsearch from root page to refind tupleshelp
-h, --host HOSTNAMEdatabase server host or socket directoryhelp
-p, --port PORTdatabase server porthelp
-U, --username USERNAMEuser name to connect ashelp
-w, --no-passwordnever prompt for passwordhelp
-W, --passwordforce password prompthelp
--maintenance-db DBNAMEalternate maintenance databasehelp
-e, --echoshow the commands being sent to the serverhelp
-j, --jobs NUMuse this many concurrent connections to the serverhelp
-P, --progressshow progress informationhelp
-v, --verbosewrite a lot of outputhelp
-V, --versionoutput version information, then exithelp
--install-missinginstall missing extensionshelp
-?, --helpshow this help, then exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.