Summary

It seems fitting that a database filled with data can also produce its own set of data by monitoring its internal activity and statistics. While in many cases it's more appropriate to set up monitoring using prebuilt external tools, as covered in the next chapter, Chapter 12, Monitoring and Trending, knowing how to directly query and derive interesting values from the database's activity and statistics collector can prove valuable. And when it comes to troubleshooting system performance issues, monitoring activity and locking data yourself is a must.

The database statistics are exposed using views you can either use all of, or reinterpret by joining with additional system catalog and activity data. Most statistics are cumulative values. ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.