43.3. pg_am

The catalog pg_am stores information about index access methods. There is one row for each index access method supported by the system.

Table 43-3. pg_am Columns

NameTypeReferencesDescription
amnamename Name of the access method
amownerint4pg_shadow.usesysidUser ID of the owner (currently not used)
amstrategiesint2 Number of operator strategies for this access method
amsupportint2 Number of support routines for this access method
amorderstrategyint2 Zero if the index offers no sort order, otherwise the strategy number of the strategy operator that describes the sort order
amcanuniquebool Does the access method support unique indexes?
amcanmulticolbool Does the access method support multicolumn indexes?
amindexnullsbool Does the access method support null index entries?
amconcurrentbool Does the access method support concurrent updates?
amgettupleregprocpg_proc.oid"Next valid tuple" function
aminsertregprocpg_proc.oid"Insert this tuple" function
ambeginscanregprocpg_proc.oid"Start new scan" function
amrescanregprocpg_proc.oid"Restart this scan" function
amendscanregprocpg_proc.oid"End this scan" function
ammarkposregprocpg_proc.oid"Mark current scan position" function
amrestrposregprocpg_proc.oid"Restore marked scan position" function
ambuildregprocpg_proc.oid"Build new index" function
ambulkdeleteregprocpg_proc.oidBulk-delete function
amvacuumcleanupregprocpg_proc.oidPost-VACUUM cleanup function
amcostestimateregprocpg_proc.oidFunction to estimate cost of an index scan

An index access method that supports multiple columns (has amcanmulticol true) must support indexing null values in columns after the first, because the planner will assume the index can be used for queries on just the first column(s). For example, consider an index on (a,b) and a query with WHERE a = 4. The system will assume the index can be used to scan for rows with a = 4, which is wrong if the index omits rows where b is null. It is, however, OK to omit rows where the first indexed column is null. (GiST currently does so.) amindexnulls should be set true only if the index access method indexes all rows, including arbitrary combinations of null values.

>