HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pg_amcheck — Check for corruption in one or more PostgreSQL databases. More information: <https://www.postgresql.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
corruptioncommandclipg_amcheckmorecheckforone

Problem

How to use the pg_amcheck command: Check for corruption in one or more PostgreSQL databases. More information: <https://www.postgresql.org/docs/current/app-pgamcheck.html>.

Solution

pg_amcheck — Check for corruption in one or more PostgreSQL databases. More information: <https://www.postgresql.org/docs/current/app-pgamcheck.html>.

Check a specific database:
pg_amcheck {{dbname}}


Check all databases:
pg_amcheck {{[-a|--all]}}


Check databases matching the specified pattern:
pg_amcheck {{[-d|--database]}} {{pattern}}


Check specific tables within a database:
pg_amcheck {{[-t|--table]}} {{pattern}} {{dbname}}


Check specific schemas within a database:
pg_amcheck {{[-s|--schema]}} {{pattern}} {{dbname}}


Display help:
pg_amcheck {{[-?|--help]}}

Code Snippets

Check a specific database

pg_amcheck {{dbname}}

Check all databases

pg_amcheck {{[-a|--all]}}

Check databases matching the specified pattern

pg_amcheck {{[-d|--database]}} {{pattern}}

Check specific tables within a database

pg_amcheck {{[-t|--table]}} {{pattern}} {{dbname}}

Check specific schemas within a database

pg_amcheck {{[-s|--schema]}} {{pattern}} {{dbname}}

Context

tldr-pages: common/pg_amcheck

Revisions (0)

No revisions yet.