我们的数据平面不再依赖 Postgres
数据平面需要跟踪什么
Pinecone serverless 将索引数据以不可变文件的形式存储在对象存储中。每次写入首先进入我们的预写日志(WAL),索引构建器把 WAL 转换成文件,查询执行器加载回答查询所需的文件。总得有东西来跟踪:当前一个索引由哪些文件组成、每个命名空间(索引的一个分区)的数据存放在哪里、哪些工作节点存活并能提供服务。这套记账就是元数据。过去这些全都放在 Postgres 里。而我们其余数据所在的对象存储并不适合承载它。你完全可以在对象存储之上构建一个数据库,但元数据体量很小、读取极其频繁,其中一部分的写入也同样频繁,因此每次请求的延迟和成本会迅速累积。
图 1。我们的集群最多有四类托管 PG 数据库。如今,主体数据存放在对象存储中,元数据则存放在 FDB。
托管 Postgres 让我们付出了什么代价
托管产品会开箱即用地提供备份、复制和故障转移这类好东西。它试图给你一种无需干预、或至少是低接触的体验。但任何保证都建立在假设之上,而我们亲眼看到,“托管”实际上并不意味着“在负载极度多变的情况下仍能可靠地保持一致的行为”。
不到三年里,我们合并了约一百项调整这些数据库规格、层级或参数的变更,其中大约五分之一只是把 on-call 在事故期间已经在控制台里 click-ops™ 手动点过的操作记录下来。随着成本和延迟之间的权衡发生变化,我们的 AWS 集群在无服务器和预置实例之间来回切换了四次。每个云都有自己的怪癖:在 AlloyDB 上,调整规格就是一次故障转移;在 RDS 上,连接数耗尽曾导致一次跨可用区故障转移;而当时只有 AWS 能自动扩缩容。我们还不得不接受大多并不想要或不需要的引擎升级,讽刺的是,真正需要的升级有时甚至做不了,因为有些数据库表太多了。哦,还有时不时某个数据库会自己重启,通常会在它恢复期间导致短暂不可用。
最糟糕的部分主要得怪我们自己。我们最初的设计是每个 Pinecone 索引创建多张 PG 表(复数)。事后看,这个设计决策被证明扩展性不佳,但考虑到我们当时的种种约束,它是合理的,而且以我们当时瞄准的规模而言,单就这一点来说本来大体上也没问题。但当然,假设总会崩塌:在每个数据平面里,我们都运行着内部检查器,它们会循环不断地创建索引,以跑通整个生命周期。这些检查器里的一个 bug 意味着它们创建的索引永远不会被清理,于是我们把它们的表全都保留了下来。这些检查器每五秒创建一个索引(每个环境每天约 17,000 个,横跨七个环境)。这个算术我们就不替你算了。数百万张空的、垃圾表被留了下来。数百万张。情况糟糕到 2024 年 8 月 AWS 警告我们,其中一个数据库正接近事务 ID 回绕。原来 PG 用 32 位为事务编号,也就是大约 40 亿个 ID,而每张表都必须在计数器走过一半之前被冻结,否则 PG 就会停止接受写入。冻结所有这些表需要手动执行 vacuum,持续了 40 多个小时。我们把自己弄到了这样一种境地:得让最优秀的工程师去搞清楚这个可以说相当小众的 Postgres 机制——大多数人从来不必考虑它。
在任何时刻,团队里都有某个人在照看一个 Postgres 数据库。
迁移,迁移,迁移
我们并不是一次性移除 PG 的。每一类数据库都随着不同的项目而退出。
图 2。每一类数据库都按各自的节奏退出,从 2024 年峰值时的 77 个,到 2026 年 9 月归零。
我们最初从向量目录入手,它是一个记录系统,把向量 ID 映射到文件和偏移量。2025 年,通过“Clustering to Slab”迁移,我们全新的 slab 架构让这些数据得以放入一个新的对象存储文件(内部称为 vlookup)中,每个 slab 都有一个这样的文件。这次架构迁移堪称传奇之举,值得单独写一篇文章,很快就会发布。
我们的 WAL 文件早已存放在对象存储中,但元数据和一致性层一直留在 PG 里,因为 S3 直到 2024 年底才支持条件写入。2025 年 12 月,我们把元数据也迁移到了对象存储,并交由它通过条件写入来保证一致性。这同样是一个相当庞大的项目,故事留待日后再讲。
这两类数据库加起来,占我们托管 PG 开销的一半以上。剩下两类数据库在数据量和成本上都更小,但数据平面中几乎每一次读取和每一次写入都会触及“系统”和“控制”这两个数据库。这正是我们将在本文剩余部分讲述的迁移(更准确地说,是一系列迁移)。
我们早就知道必须摆脱 Postgres,但这件事一再被推迟。BYOC 成了倒逼的契机。在 BYOC 模式下,我们运行在客户自己的云账户中,那里的一切都由客户提供和维护。在这种情况下还需要 RDS,会加重他们的运维负担;而在那些只允许使用经过批准的云服务清单的组织里,这甚至可能直接让方案无法落地。我们希望有一个元数据存储,无论在哪里运行 k8s,都能以同样的方式工作。
FoundationDB 是一个开源分布式键值存储,键有序,并支持跨任意键集合的完全可串行化事务。它是 Snowflake、Datadog 等系统背后的元数据层。它通过确定性模拟进行测试,并附带一个持续维护的 k8s operator。目前,我们的每个集群都运行自己的 FDB 集群。
另一个原因是,我们的工作负载一直是键值型的。我们有意从不使用 join,每次查找都按键或键范围进行,因此分布式 SQL 数据库意味着要运行一套我们并不需要的查询引擎。我们自己跑 PG 也解决不了真正的问题:我们还得自己实现高可用。像 PgBouncer 这样的连接池工具或许能应对连接数限制,但对某个分片的每次写入仍然要经过单一主节点,因此扩展分片的唯一办法就是换更大的机器或手动拆分。而对我们来说不断增长的是命名空间的数量,FDB 会自行拆分键范围并在各服务器之间迁移来处理这一点。
FDB 从 2023 年起就进入了我们的视野,显然是最先要尝试的方案。稍作测试后,结果印证了我们预期的取舍:PG 在单键读取上更快,而 FDB 在批量写入上更快。1
图 3. 该测试中的 p95 延迟,按索引中的命名空间数量划分。
从表到键范围
从 SQL 转向键值存储意味着,过去由数据库替你完成的一大堆工作现在成了你自己的问题。我们来看看存放命名空间元数据的那张表:
CREATE TABLE mappings ( id VARCHAR PRIMARY KEY, index_id VARCHAR NOT NULL, namespace VARCHAR NOT NULL, status VARCHAR NOT NULL, deleted_at TIMESTAMP, ... ); CREATE UNIQUE INDEX ON mappings (index_id, namespace, deleted_at); CREATE INDEX ON mappings (index_id, status); CREATE INDEX ON mappings (id, status);
在 PG 中,你只需声明一个索引。FDB 只有有序键,因此每个索引都变成我们自己写入的一系列键,与记录在同一个事务中:
fn write_mapping(trx: &Transaction, m: &Mapping) { trx.set(&RECORDS.pack(&(m.index, m.id)), &m.encode_to_vec()); trx.set(&BY_NAMESPACE.pack(&(m.index, &m.namespace, m.deleted_at)), m.id.as_bytes()); trx.set(&BY_INDEX_STATUS.pack(&(m.index, m.status, m.id)), b""); trx.set(&BY_STATUS.pack(&(m.status, m.id)), m.index.as_bytes()); trx.atomic_op(&COUNTS.pack(&m.index), &1i64.to_le_bytes(), MutationType::Add); }
每个 FDB 键和值都是纯字节。pack 将像 (index, namespace, deleted_at) 这样的元组转换为字节,这些字节的排序方式与元组相同,因此“此索引下的所有内容”就是一次范围读取。我们将值编码为 protobuf,我们的数据平面已经到处在使用它,因此我们可以添加字段而无需重写旧记录。而行计数变成了原子计数器,并发写入者可以递增它而不会相互冲突(只要他们不读取它)。
由于我们现在自己维护索引,我们需要让漂移不可能被忽略。因此,我们让每个 FDB 存储实现与其 PG 前身相同的 Rust trait,并且两者都运行相同的测试套件以及随机化属性测试。每次 FDB 测试后,一个检查器仅从记录重建每个索引键,并将结果与实际存储的内容进行 diff:
let expected: BTreeMap<_, _> = scan(&trx, &RECORDS).await .into_iter() .flat_map(|(key, m)| index_entries(&key, &m)) .collect(); let actual: BTreeMap<_, _> = scan_all(&trx, [&BY_NAMESPACE, &BY_INDEX_STATUS, &BY_STATUS]).await; assert_eq!(expected, actual, "an index drifted from its records");
原文较长,译文为节选;译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Our data plane doesn't run on Postgres anymore)
What the data plane keeps track of
Pinecone serverless stores index data as immutable files in object storage. Every write first lands in our write-ahead log (WAL), index builders turn the WAL into files, query executors load whichever files they need to answer a query. Something has to keep track of which files make up an index right now, where each namespace (a partition of an index) keeps its data, which workers are alive to serve it. That bookkeeping is the metadata. All of it used to live in Postgres. Object storage, where the rest of our data lives, is a poor fit for it. You can build a database entirely on object storage, but metadata is tiny and read very frequently, and some of it gets written just as often, so per-request latency and cost add up fast.

Figure 1. Our clusters had up to four kinds of managed PG databases. Today the bulk data sits in object storage, the metadata in FDB.
What managed Postgres cost us
A managed product gives you nice things like backups, replication and failover out of the box. It tries to give you a hands-off or at least low-touch experience. But no guarantees come without assumptions, and we saw firsthand that “managed” doesn’t actually mean “reliably guaranteed to behave the same under extremely variable workloads”.
In less than three years we merged about a hundred changes that resized, re-tiered or retuned these databases, and roughly a fifth of them just wrote down what on-call had already click-ops'ed™ through in a console during an incident. Our AWS fleet went back and forth between serverless and provisioned instances four separate times as the cost and latency trade-offs changed. Each cloud had its own quirks: on AlloyDB resizing is a failover, on RDS running out of connections once ended in a cross-zone failover, and only AWS could autoscale back then. We also had to take engine upgrades we mostly didn’t want or need, and ironically the ones we did need, we sometimes couldn’t even do because some databases had too many tables. Oh, and every now and then a database would just restart, which usually led to a blip of unavailability while it came back.
The worst of it was mostly on us. Our original design created PG tables, plural, per Pinecone index. In hindsight this was a design decision that would prove not to scale well, but it made sense given the constraints we had back then, and that on its own would have been mostly fine at the scale we were aiming for. But of course, assumptions fall apart: in each data plane, we run internal checkers that keep creating indexes in a loop to exercise the whole lifecycle. A bug in those checkers meant their indexes never got cleaned up, so we held onto all of their tables. Those checkers created an index every five seconds (about 17,000 a day, per environment, across seven environments). We'll spare you the math on this one. Millions of empty, garbage tables were left behind. Millions. It got so bad that in August 2024 AWS warned us that one of our databases was approaching transaction ID wraparound. Turns out that PG numbers transactions with 32 bits, so about 4 billion IDs, and every table has to be frozen before the counter gets halfway around, or PG stops accepting writes. Freezing all of those tables took manual vacuums that ran for more than 40 hours. We put ourselves into a situation where we needed to have our best engineers figuring out this arguably niche Postgres mechanism most people never had to think about.
At any given time, someone on the team was babysitting a Postgres database.
Migrations, migrations, migrations
We didn't remove PG in one go. Each kind of database left with a different project.
Figure 2. Each kind of database left on its own schedule, from a peak of 77 in 2024 to zero in September 2026.
We first started with the vector directory, which was a system of record mapping vector IDs to files and offsets. In 2025, through the “Clustering to Slab” migration, our new slab architecture made it possible to place this data in a new object store file (internally called vlookup) that exists for each slab. This architectural migration was a legendary feat, and deserving of its own post coming soon.
Our WAL files were already in object storage, but the metadata and consistency layer had lived in PG, because S3 didn't support conditional writes until late 2024. In December 2025 we moved the metadata to object storage too, and let it handle consistency using conditional writes. This too was a pretty hefty project, and a story for another day.
Together, those two kinds of databases were more than half of what we spent on managed PG. The remaining two were smaller in data size and cost, but pretty much every read and every write in the data plane touched the "system" and "control" databases. This is the migration (or more precisely, the set of migrations) we're going to cover in the rest of this post.
We'd known for a while that we needed to get off Postgres, but it kept getting pushed back. BYOC was the forcing function. With BYOC we run inside our customers' own cloud accounts, where they provide and maintain everything. Needing RDS there adds to their operational burden, and in orgs that only allow an approved list of cloud services, it could be a non-starter. We wanted one metadata store that runs the same way anywhere k8s runs.
FoundationDB is an open-source, distributed key-value store with ordered keys and fully serializable transactions across any set of keys. It's the metadata layer behind systems like Snowflake and Datadog. It's tested with deterministic simulation, and it comes with a maintained k8s operator. Today each of our clusters runs its own FDB cluster.
The other reason is that our workload had always been key-value. We had intentionally never used joins and every lookup was by key or key range, so a distributed SQL database would have meant running a query engine we didn't need. Running PG ourselves wouldn't have fixed the real problem either: we'd have had to run HA ourselves. A pooler like PgBouncer would probably have handled the connection limits, but every write to a shard still goes through a single primary, so the only ways to grow a shard are a bigger machine or splitting it by hand. And what kept growing for us was the number of namespaces, which FDB handles by splitting and moving key ranges across its servers on its own.
FDB had been on our radar since 2023 and was the obvious first thing to try. A quick test later showed the trade-off we expected: PG was faster for single-key reads, and FDB was faster for batched writes.1
Figure 3. p95 latency from that test, by number of namespaces in the index.
From tables to key ranges
Going from SQL to a key-value store means a bunch of work the database used to do for you is now your problem. Let’s look at the table that holds our namespace metadata:
CREATE TABLE mappings (
id VARCHAR PRIMARY KEY,
index_id VARCHAR NOT NULL,
namespace VARCHAR NOT NULL,
status VARCHAR NOT NULL,
deleted_at TIMESTAMP,
...
);
CREATE UNIQUE INDEX ON mappings (index_id, namespace, deleted_at);
CREATE INDEX ON mappings (index_id, status);
CREATE INDEX ON mappings (id, status);
In PG, you simply declare an index. FDB just has sorted keys, so every index becomes a range of keys we write ourselves, in the same transaction as the record:
fn write_mapping(trx: &Transaction, m: &Mapping) {
trx.set(&RECORDS.pack(&(m.index, m.id)), &m.encode_to_vec());
trx.set(&BY_NAMESPACE.pack(&(m.index, &m.namespace, m.deleted_at)), m.id.as_bytes());
trx.set(&BY_INDEX_STATUS.pack(&(m.index, m.status, m.id)), b"");
trx.set(&BY_STATUS.pack(&(m.status, m.id)), m.index.as_bytes());
trx.atomic_op(&COUNTS.pack(&m.index), &1i64.to_le_bytes(), MutationType::Add);
}
Every FDB key and value is plain bytes. pack turns a tuple like (index, namespace, deleted_at) into bytes that sort the same way the tuple does, so "everything under this index" is a single range read. We encoded values as protobuf, which our data plane already used everywhere, so we could add fields without rewriting old records. And counting rows became an atomic counter, which concurrent writers can bump without conflicting with each other (as long as they don't also read it).
Since we now maintained the indexes ourselves, we needed to make drift impossible to miss. So we made every FDB store implement the same Rust trait as its PG predecessor, and both ran the same test suite plus randomized property tests. After every FDB test, a checker rebuilt every index key from the records alone and diffed the result against what was actually stored:
let expected: BTreeMap<_, _> = scan(&trx, &RECORDS).await
.into_iter()
.flat_map(|(key, m)| index_entries(&key, &m))
.collect();
let actual: BTreeMap<_, _> = scan_all(&trx, [&BY_NAMESPACE, &BY_INDEX_STATUS, &BY_STATUS]).await;
assert_eq!(expected, actual, "an index drifted from its records");
One way to move live data between databases is to write to both of them for a while. Stripe described the canonical four steps: dual-write, move reads, move writes, then delete the old data. But it’s a well-known trap, sometimes referred to as the dual-write problem: you can't write to two separate systems atomically. Sooner or later one write succeeds and the other doesn't, so you need a reconciler to find and repair the difference.
Our first design was dual-write as well. During review, a teammate suggested a different rule: in any phase of a migration, a write goes to exactly one database, while reads are allowed to fall back from one database to the other. We ended up applying it to every piece of metadata we moved.
From safe and easy to hard and scary
Some records are ephemeral by nature (e.g. leases), so data loss becomes a non-issue. Other records belong to a single service that can tolerate a short pause, so you can just switch writes over, copy what's left, and you're done. That covered most of the tables we had left. From there, the more complex the access patterns and the more critical the table, the harder the migration got.
Manifests are the list of files that make up a namespace, and every query reads one. Copying everything and flipping doesn't work here, because manifests keep changing while you copy. But they're also derived, since an index builder can always rebuild the newest manifest from the WAL. So we could migrate them by reading through first instead of doing one big copy up front, in four steps:
Figure 4. Migrating manifests. In every phase, each write lands in exactly one database.
First, reads learned to fall back from FDB to PG. At this point, as expected, we saw a 100% fallback rate, because nothing was on FDB yet. Then writers switched to FDB, and we started seeing the fallback rate steadily drop as FDB filled up with new manifests. Then a backfill copied the older manifests across, and finally, reads stopped falling back.
Falling back is only correct while a manifest missing from FDB means "not moved yet" and a manifest present there means "newest". If you backfilled before flipping writes, PG could still get new manifests during the backfill, and you'd then have to figure out which one is newer. That's why the backfill has to come only after the writers move.
To make things more interesting, switching writers is a rolling restart, which means for a few minutes old and new pods publish side by side, and the same index could get a new manifest in both databases, giving you the exact same problem of figuring out which one is newer.
Fortunately, every manifest records how far into the WAL it covers, so the backfill only ever replaced an FDB manifest with a newer one. In the worst case, one of two competing manifests gets dropped, and that only costs work, since manifests can be rebuilt. The index builder replays the WAL from wherever the surviving manifest left off, and the files a compaction would have replaced are only ever cleaned up by garbage collection, which we paused for the migration. Before cutting each cluster over, a verification pass compared those WAL positions and made sure nothing in PG was newer than its FDB copy.
The scariest one by far was migrating the table holding our internal mappings. These say where each namespace's data lives. Nothing rebuilds them if they're lost, lots of different services write to them, and nearly every reader and writer in the data plane depends on them.
We needed as much assurance as we could get before starting, so we made automated FDB backups a hard requirement on every production cluster: a continuous backup that trails the live database by well under a minute, plus daily snapshots.
We weren't going to stop writes for a whole cluster, so the mappings moved one index at a time, and every write had to know which side of the move its index was on. A small state table in PG tracked that. It helped that writes to these mappings are infrequent, so each index could tolerate a few seconds of blocking.
Figure 5. Migrating mappings, one index at a time. Writes to an index are blocked only while the last changes are copied and verified.
A write to an index always started by looking up that index's state.
While the index was on PG, the write locked the state row and wrote to PG in the same transaction, so the migration could never flip the index from underneath it.
While the index was migrating, writes waited and retried.
Once the index was on FDB, writes still glanced at the state but no longer held the lock. They went straight to FDB.
To keep the write freeze as short as we could, we first copied all the rows from PG to FDB. Keep in mind, though, that this copy happened live and writes never stopped, so there would always be more rows to copy, and some freeze was unavoidable. Once the first copy completed, we blocked writes and migrated (and verified) the small diff of new writes that had piled up. For a typical index that was way less than a second (the longest pause we recorded on a live index was about three and a half seconds). Reads were never blocked, every other index kept taking writes the whole time.
Once every index was on FDB, the small state table went away with the rest of PG.
What self-hosted FoundationDB costs us
Self-hosting FDB brings its own set of challenges. You usually have mostly yourself to blame if something goes wrong, and there are no support tickets to file or anyone to escalate to. What this meant for us was learning the hard way, and writing some additional tooling to address QoL gaps.
The upgrade that killed all storage servers at once
One day, we started a routine deploy, like we always do. An FDB patch upgrade also changed a sidecar's container image, which meant the k8s operator had to recreate the storage pods instead of updating them in place. It's supposed to do that one failure domain at a time, which our redundancy_mode: double survives just fine. The (old) operator version we were running had a bug: with zones taken from node labels, it looked them up in an environment variable that's never set, so every storage pod looked like it was in the same zone, and the operator went ahead and deleted all of them at once (the pods, not the data, which sat on persistent disks), on every FDB cluster it touched.
The other clusters got new nodes quickly and were down for just a few minutes. One GCP cluster was in a zonal capacity shortage (you probably know which region) and didn't get any. Our main dashboard was painted red, and that cluster had a full read and write outage for about 25 minutes, until we freed up room by hand. The data came back intact as soon as the storage pods were scheduled, since the operator only deleted the pods and each new one reattached to its old disk. The bug had already been fixed upstream.2 We upgraded the operator and changed its deletion mode to remove one pod at a time3, which made things a lot simpler.
Whales, hippos and e-brakes
The mapping migration ran indexes smallest-first, and saved the largest ones, the "whales" 🐳, for a careful one-at-a-time pass. On one cluster we ran it with way too much parallelism, naively thinking that non-whale indexes wouldn't amount to much load, but what we didn't think of was that all the indexes sitting just below the whale threshold (near-whales, if you will) could finish at exactly the same moment. About 660,000 rows hit FDB in under a minute. When FDB's storage servers fall behind, it starts throttling new transactions, and past a hard limit (a.k.a. the e-brake) a storage server stops pulling new writes from the logs until it catches up. The storage disks saturated, the queue blew past the throttle and into the e-brake, and for about four minutes a large share of that cluster's requests failed. At least we learned an important lesson:
We had never pushed FDB that hard before, so the migration tool had no rate limit. What it did have was four knobs:
--shards: which control databases to copy from, all at once
--index-parallelism: how many indexes per database at a time
--fdb-write-concurrency: how many FDB transactions per index at a time
--fdb-write-batch: how many rows per transaction
None of these is a rate, but multiplied together they show how many rows are in flight at any moment. That afternoon we had:
But FDB works in writes/s, so let’s translate: each of our rows is 4 writes (the record plus 3 index entries), about 75 bytes each. For keys and values that size, the expected throughput as advertised is roughly 20,000 writes a second per core (on our clusters the disks set the real ceiling, so treat it as a ballpark). We run five storage servers and keep two copies of everything, so:
At the peak, FDB measured about 190,000 writes (47,000 rows) a second coming in, roughly 4 times that. A hippo's keys sit right next to each other, so the hottest storage server was taking in about double the average. That storage server's disk couldn't keep up, and its queue went from 50 MB to the 1.5 GB e-brake in about two minutes.
FDB commits a write once it's safely on the transaction logs, and the storage servers apply it afterwards. So our commits stayed fast the whole time. But FDB's ratekeeper, which throttles new transactions as the storage queues fill up, cut the limit from effectively unlimited to about ten transactions a second, and every transaction has to fit under that limit, reads included. Our migration ran at the same priority as customer traffic, so customer requests had to compete with it, and our query routers not retrying FDB's retryable errors made it worse. In hindsight, the migration tool should have used FDB's batch priority, which exists exactly so bulk jobs get throttled before everyone else.
That evening we ran the rest with just 250 rows in flight in total, which came out to about 13,000 rows a second, right at the ~12,500 we estimated above, with no headroom to spare. The queue topped out under the throttle, and nothing failed:
Figure 6. The storage write queue on that cluster. Left: everything finishing at once. Right: the same cluster that evening, with the knobs turned down.
SQL, on top of FoundationDB
Moving off PG meant losing psql, and our team's muscle memory is very much SELECT * FROM. FDB's CLI works only with raw keys and bytes. But the values we stored were protobuf, so reading them raw was a non-starter.
So we built fdbsql, a small read-only SQL shell over our FDB stores.
It's built on Apache DataFusion. Each FDB store becomes a DataFusion table. A scan pages through the store's key range using snapshot reads, handing out Arrow batches to DataFusion. When a query pins the first column of the key, the scan narrows down to that key range instead of reading the whole store.
Nobody writes a schema for these tables, the columns come straight from the protobuf definitions the stores already have. One line in our protobuf build makes every message in the data plane queryable:
// build.rs
builder = builder.type_attribute(".", "#[derive(::pc_introspect::Introspect)]");
Add a field to a proto and it just shows up in SELECT *.
The Rust implementation for the FDB stores, the migration code, the scripts, utils, monitors and the ops themselves took six long months, and it would have taken a lot longer without coding agents. Quickly turning thoughts into working POCs sped the whole thing up massively. Agents also made room for things we'd probably have skipped: before running any of this in production, we had Claude Code write a formal model of the mapping migration in TLA+ (which we reviewed for completeness), then had a model checker go through every interleaving of two pods, two indexes and the migration tool. It checked 1.5 million states. Along the way it even found an actual bug in our runbook.4
On September 25 we merged the change that removed PG from the data plane's code, deleting roughly 40k LoC.5 Between September 27 and 29, a routine deploy destroyed the last 24 control databases. The data plane's PG bill went to zero, and the FDB clusters that took over cost about a third of the databases they replaced.6
Figure 7. Monthly spend across all three clouds, relative to the most expensive month. Each kind of database disappears when its project lands. FDB is shown from its first full month on its own nodes.
Ever since a lot of us got here, it's been "RDS this" and "Postgres that", and we've been refactoring, migrating, downsizing and deleting things ever since. Shutting down the last Postgres pieces in the data plane really felt like a wrap-up of years of joint work, spread across a lot of teams and engineers.
Postgres and object storage are good defaults, but at some point scale and cost push you into making an opinionated choice, and for us that was FDB.
By the way, if making opinionated choices about distributed systems sounds like your kind of work, we're hiring!
PG won single-key reads by 1.4 to 2×, but both sides stayed in single-digit milliseconds. In production our query routers answer about 98% of these lookups from cache, so the slower single-key reads add well under a millisecond to an average query. ↩︎
fdb-kubernetes-operator #2465, released in v2.27.0 in May 2026. We were still running v2.22.0. ↩︎
Strictly, the operator's ProcessGroup deletion mode removes one process group at a time: an FDB server process plus the pod it runs in. We run one storage server per pod, so in practice it's one pod at a time. ↩︎
A pod that hadn't picked up the "new indexes start on FDB" setting yet could still create an index on PG after we had already counted them. The runbook got a new step that waits for the setting to reach every pod. ↩︎
The PR was titled THE GREAT POSTGRES EXTINCTION. There were knife emojis involved 🔪. ↩︎
Spend is grouped by database name across AWS, GCP and Azure. FDB counts the nodes it runs on and their disks. ↩︎
Was this article helpful?
Start building knowledgeable AI today
Create your first index for free, then pay as you go when you're ready to scale.
原文为英文,正文由自动抓取并保留原文。
原文发布于 Pinecone Blog(Our data plane doesn't run on Postgres anymore),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。