11 PostgreSQL, best practices, and you: Final insights

 

In this chapter

  • Exploring how common user profiles shape PostgreSQL mistakes
  • Planning proactively to avoid technical debt and problem escalation
  • Approaching and improving a poorly designed inherited PostgreSQL database
  • Using PostgreSQL thoughtfully to improve performance and reliability

11.1 What type of user are you?

Having discussed errors and potential mishaps at length, it’s now time to take a step back and look at the PostgreSQL experience from a distance for more perspective. One of the reasons why PostgreSQL means so much and is loved by so many different kinds of users is that it can cater to their varied requirements. And yes, PostgreSQL users are not all the same—this much is obvious. From professional experience and talking to people at conferences alike, it’s become clear to me that there is a vast range of people doing all sorts of different stuff with our database of choice, and more use cases crop up every day!

When someone shares a Postgres success story, that is really cool because you get to learn about a new or different use case. When someone shares a story of trying and failing to make something work using Postgres, that is equally interesting because understanding the underlying reasons for the failure is important for avoiding similar scenarios and seeking alternate paths. Incidentally, that is the whole premise of reliability and safety engineering and the whole culture that surrounds the discipline.

11.1.1 The dabbler

11.1.2 The cautious steward

11.1.3 The oblivious coder

11.1.4 The freefaller

11.2 Be proactive: Act early

11.3 All right, so you inherited a bad database

11.3.1 “Historical reasons”

11.3.2 What now?

11.3.3 First things first

11.4 Treat Postgres well, and it will treat you well

Summary