Hacker News new | ask | show | jobs
by gen220 53 days ago
Just be wary that if your app is a high-write-throughput or high-update-frequency system, this is not a free lunch!

The indices will bloat in size (postgres does not vacuum them in the way a table is vacuumed), and begin to bottleneck primary writer latency.

You should repack the indices every once in a while (you can set up monitors on index bloat) with something like pg_repack, and make sure that your indices are minimally-sized (i.e. omit rows that are never scanned, use pg_stat to verify which indices are actually used by the primary or read-replicas).