Summary 

Catalog tables provides invaluable information to maintain and automate 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, one can automate daily tasks checks such as bloats, locks, size, and database health. Also, with the usage of statistical table, we were able to detect unused indexes, as well as potential columns which require indexing such as foreign keys 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 catalog, one can write a complete book of recipes, and one can have recipes in his backlog for database cluster health including memory consumption, idle connections, database size, and processes status. In addition to that, one can have recipes to handle roles and role membership, objects permissions, locks detection, and streaming replication health. 

The next chapter, discusses several approaches to optimize performance. It presents PostgreSQL cluster configuration settings, which are used in tuning the whole cluster's performance. Also, it presents common mistakes in writing queries and discusses several approaches to increase performance, such as using indexes or table partitioning and constraint exclusion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset