PostgreSQL features a contrib module called amcheck
. This module provides functions that allow you to verify the logical consistency of the structure of relations. Its functionalities originally appeared in PostgreSQL 10.
Where does the name come from? I understand the check
part of the name, but what is the meaning of am
?
CodePudding user response:
“am” stands for access method, which is a way to access a table. You can find the same abbreviation in the system catalog pg_am
, which lists all known access methods.
A historical note: the module was added in v10 with this commit after this discussion. Originally it only supported checks in B-tree indexes. Back then, “am” was roughly equivalent to “index type” in PostgreSQL slang, so the module name would have been understood as “index integrity check”. PostgreSQL v12 introduced table access methods (other ways to store data in tables), so that the meaning of access method has broadened. In v14, amcheck got a new function verify_heapam
to check the integrity of tables, so the name “amcheck” has stood the test of time.