| The startup's Postgres survival guide(hatchet.run) | |
| 437 points by abelanger 1 day ago | 198 comments | |
tl;dr: A Hatchet engineer distills two years of production Postgres experience into a practical guide covering schema design, indexing, query planning, and connection pooling, with an emphasis on avoiding sequential scans and keeping transactions short. The doc also digs into intermediate and advanced topics like tuning autovacuum to prevent bloat and transaction ID wraparound, batching writes for ~10x throughput, using FOR UPDATE SKIP LOCKED for job queues, and partitioning for time-series data. Includes tips on safely migrating large tables using triggers and batched backfills outside transactions. | |
HN Discussion:
| |