既然已经有了 Postgres,真的还需要独立的系统吗?
Do you need separate systems when you already have Postgres?

原始链接: https://postgresisenough.dev/

许多工程团队饱受“过早优化”之苦,在真正需要之前就采用了臃肿的“Webscale™”技术栈,堆砌了各种分散的数据库和服务(如 Redis、Kafka、Elasticsearch 等)。这种架构复杂性带来了沉重的运维负担——不仅增加了成本和维护难度,还提高了凌晨发生事故的概率。 现实情况是,Postgres 是一个多功能且强大的工具,足以满足绝大多数应用需求。诸如用于处理文档的 `JSONB`、用于人工智能的 `pgvector`、用于搜索的 `tsvector`,以及用于队列的 `SKIP LOCKED` 等功能,使开发者能够将基础设施整合进单一、可靠的系统中。 虽然专用工具的存在自有其道理,但它们应该是最后的选择,而非默认项。除非初创公司真的超出了 Postgres 的承载能力——这在极少数情况下才会发生——否则选择“无聊”的技术几乎总是更好的。通过以 Postgres 为核心进行整合,团队可以减少运维覆盖面,专注于创新,并将复杂性推迟到迫不得已时再处理。复杂性是一种债务,除非别无选择,否则请避免背负它。

```Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 当你已经有了 Postgres,真的还需要独立的系统吗? (postgresisenough.dev) 15 分,b-man 发布于 35 分钟前 | 隐藏 | 过往 | 收藏 | 2 条评论 帮助 samrus 13 分钟前 | 下一条 [–] 让我想起了 Kai Lentit 的 ffmpeg 视频 https://youtu.be/9kaIXkImCAM 回复 PaulHoule 29 分钟前 | 上一条 [–] ……而且与所有那些新型数据库不同,Postgres 有着体面的许可证。其他人因为太害怕被 AWS “收编”,以至于不让你按照自己想要的方式去运行它们。 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:```
相关文章

原文

It started with a gist and a lively Hacker News thread. The premise was simple: Postgres isn't the best at everything, but it's good enough for most things. In practice, most teams are running too many microservices and databases. It's all premature optimization. More operational overhead, more maintenance burden, more monitoring complexity, higher costs, harder tracing, and longer debugging sessions.

The Typical Pattern

You need caching, so you add Redis. Full-text search? Bolt-on Elasticsearch. Background jobs? Another Redis, or maybe Sidekiq. Documents with flexible schemas? Default to MongoDB. Analytics? Snowflake. Events? Reach for Kafka. Before long, your "simple" application talks to seven different data stores and microservices, each with its own deployment, backup strategy, failure modes, and 3 AM pages when they stop talking to each other. Each system adds operational surface area: monitoring, alerting, failover testing, security patching, version upgrades.

The "Webscale™" Stack

Application

Redis

Postgres

Elastic

MongoDB

Snowflake

Kafka

Pinecone

Sidekiq

InfluxDB

Multiple systems to operate and monitor

With Postgres

Application

One database. One backup strategy. One set of failure modes.

"But Postgres Isn't Webscale™!"

We hear this argument all the time. But what percentage of software projects actually ever reach so-called "webscale"? About 0.3%? For your stealth startup or saas, should you really be burning your innovation tokens on multiple microservices and databases instead of the actual problem at hand?

If companies serving millions of users like Notion, Netflix, Instagram, etc trust "boring" technology, your startup can probably get by without a seven-database architecture. Besides, if you ever truly get to webscale and tap out Postgres's capabilities, you can just bring the additional pieces as needed, when truly needed.

Maybe Postgres Is Enough

Before reaching for another database, see if you can accomplish it with what Postgres already offers:

You need... You reach for... But Postgres has...
Caching Redis, Memcached UNLOGGED tables, materialized views →
Job queues Redis + Sidekiq, RabbitMQ SKIP LOCKED, pgmq, pgflow →
Full-text search Elasticsearch, Algolia tsvector, pg_trgm, ParadeDB →
Document store MongoDB, CouchDB JSONB, FerretDB →
Vector search / AI Pinecone, Weaviate pgvector, pgvectorscale →
Time-series data InfluxDB, TimescaleDB TimescaleDB, pg_partman →
Analytics / OLAP Snowflake, BigQuery pg_analytics, DuckDB integration →
Graph database Neo4j, Neptune Apache AGE, recursive CTEs →
Geospatial Specialized GIS systems PostGIS →

When You Actually Need Something Else

This isn't about dogma. Sometimes you genuinely need specialized infrastructure. But the bar should be high: only after pushing Postgres to its limits, documenting why it was insufficient, and accepting the operational cost of the alternative. Until then, every system you add is a bet that the benefit outweighs years of maintenance, monitoring, and debugging.

联系我们 contact @ memedata.com