Lead enables developers to test PlanetScale's TIN search functionality in CI/CD and local environments. By maintaining feature parity via a portable extension, teams can validate search logic, ACID compliance, and tokenization before deploying to high-performance production environments.
Yesterday, we announced TIN, a fast, full-featured search index extension for Postgres. We got a question from several readers and customers: how can I build apps on this if I can't run it in CI? Here's our answer: Lead. It's another Postgres full-text search extension, with the same feature set as TIN. All the same SQL statements and all the same TINQL searches will work fine.
One big difference: it's slow.
Lead has the same features as TIN.
Search results are correct, even for complicated SQL and TINQL queries.
Tokenizing is the same. What's a word in TIN is a word in Lead. As we add fancier tokenizers to TIN, they'll come to Lead, too.
Writes work: CREATE INDEX, INSERT, UPDATE, and DELETE.
It's even ACID, with correct snapshot isolation. Really. If you insert rows in a transaction, TIN Lead searches in that transaction will see them, and concurrent transactions won't. If you ROLLBACK, the rows disappear.
It's durable across restarts. If your tests need to restart Postgres, that's OK.
BM25 scoring works, including tin.score and tin.max_score.
It has hit highlighting, including both HTML and ANSI.
Lead will never be fast. Every search is a full table scan. The 8.0 GB Wikipedia corpus that TIN can search at 10,260 QPS with a p99 of 2ms takes four minutes per query with Lead. We tried it so you don't have to. Keep your tables in CI under a few MB, and Lead will be fine. Unofficial benchmarking has it searching War and Peace -- 3.4 MB, around half a million words -- in 170ms.
We've left out all the parts that make TIN fast, but kept the rest.
You can download Lead today. (And be sure to star the repo!) Build your production search apps on TIN and build your tests, CI, dev, and staging on Lead. If you find ways you need Lead to be more like TIN, open a support ticket or find us on Discord.
Continue reading on the original blog to support the author
Read full articleWhile convenient, ON DELETE CASCADE introduces hidden operational risks like lock contention, WAL bloat, and accidental data loss. Understanding these failure modes helps engineers design more resilient database schemas and avoid production outages during routine migrations or deletions.
These updates bridge the gap between traditional Postgres and distributed sharding. With read-only replicas, Azure support, and massive performance boosts to bulk writes, Neki offers a scalable path for Postgres workloads without sacrificing SQL compatibility or developer experience.
This expansion allows Azure-based teams to utilize PlanetScale's managed database features with low latency. The technical implementation highlights sophisticated Kubernetes networking strategies to overcome cloud provider IP limitations at scale.
Understanding TOAST is crucial for database performance and storage optimization. As Postgres 19 shifts to LZ4 by default, engineers must understand how compression thresholds and storage strategies affect row density and query latency in large-scale production environments.