Hard java backend

Read replicas or partitioning for heavy tables

The 30 second answer

When reads overload the primary, I send read-only traffic to replicas, accepting a little replication lag for that data. When a single table becomes very large, partitioning by time or key lets queries skip whole partitions and makes deleting old data cheap. Partitioning is not a general speed-up; it helps mainly with very large tables and queries that filter on the partition key.

Hot standby lets a replica serve read-only queries. Replicas are asynchronous by default, so reads can be slightly stale. Partitioning splits a big table. Queries that filter on the partition key read only the matching partitions (partition pruning), and old data can be dropped by detaching a partition.

Note: the partitioning docs say the benefits show up mainly when a table is very large. It is not a general speed-up.

Sources (2)
  1. PostgreSQL 17: Hot Standby
  2. Table Partitioning