This is a python module for several postgresql performance metrics.  Works with Postgresql 9.2 and 9.3.  Some queries would need to be refined slightly to work with earlier versions.