Postgres Is Enough — 一個 DB 扛全部
- URL: https://www.threads.com/@oneday0013/post/DajnyLDIKbt
- Date Saved: 2026-07-09
- Source: Threads
- Tags: dev-tools
- Repo: https://github.com/Vonng/pg (referenced site: postgresisenough.dev)
Summary
@oneday0013 分享了 “Postgres Is Enough” 的觀點 — 大部分團隊不需要一堆專用資料庫,Postgres 一個就能扛。
替換表
| 需求 | 專用方案 | Postgres 替代 |
|---|---|---|
| 快取 | Redis | UNLOGGED table、物化視圖 |
| 工作佇列 | RabbitMQ | SKIP LOCKED、pgmq |
| 全文搜尋 | Elasticsearch | tsvector、pg_trgm |
| 文件儲存 | MongoDB | JSONB |
| 向量/AI | Pinecone | pgvector |
| 時序資料 | InfluxDB | TimescaleDB |
| 分析 | BigQuery | pg_analytics、DuckDB |
| 圖資料庫 | Neo4j | Apache AGE、遞迴 CTE |
| 地理資訊 | 專用 GIS | PostGIS |
核心論點
- 別急著為每個需求都上專用資料庫,先看 Postgres 現有擴展能不能做
- 管一堆系統的維運成本通常比那點效能好處還高
- 只有 0.3% 的專案會真的到 webscale
- Notion、Netflix、Instagram 用的都是「無聊」的技術
- 別把創新額度浪費在基礎設施上
留言觀點
- 極限場景會卡:ES 中文分詞、Redis 亞毫秒延遲、Kafka 百萬級吞吐,PG 擴充很難追上
- 個人專案可以,企業管理 cache 和 feature extraction 處理速度不夠
- 一咖 DB 倒全站,可用性風險需考慮
參考網站: postgresisenough.dev