Abstract
PostgreSQL is probably the most loved database to work with Go, for good reasons!
As someone helping to scale many terabytes-large postgres environments, some seemingly innocent choices like using session variables or savepoints end up being silent bottlenecks limiting the database possibilities.
In this talk we will discuss less common tips on how to keep your postgres running happy with your go application.
The goal is to guide you on how to stay flexible and prevent you from getting stuck in a position that would prevent you from scaling postgres in the future.
We will discuss:
- dos and don'ts with transactions
- avoiding session variables and temporary tables
- avoiding losing performance to network round-trips
- avoiding staying idle in the database for any reason
- staying flexible with ORMs
- being able to use proper cancellation