Catalog tables provide invaluable information for maintaining and automating database administration tasks. For example, in the previous section, we were able to dump a tree of dependent objects in the correct order. In addition to that, you can automate daily task checks, such as bloats, locks, size, and database health. Also, by using the statistical table, we were able to detect unused indexes, as well as potential columns that require indexing, such as foreign key columns.
The PostgreSQL catalog contains meta information about PostgreSQL databases and objects. This information can be retrieved and manipulated using SQL statements. However, it is not recommended to manipulate the data directly in a catalog schema. PostgreSQL also provides a convenient way to extract data by providing user friendly information in information_schema.
With the help of the PostgreSQL...