The first thing you really have to learn about is understanding what PostgreSQL's on-board statistics have got to offer and using them. In my personal opinion, there is no way to improve performance and reliability without first collecting the necessary data to make prudent decisions.
This section will guide you through PostgreSQL's runtime statistics and explain in detail how you can extract more runtime information from your database setups.