Tin: full-text search for Postgres

218 points · 86 comments on HN · read original →

Points and comments are a snapshot, not live.

PlanetScale releases TIN, a proprietary full-text search extension for Postgres that uses ctids for fast BM25 queries.

TIN is a full-text search extension for Postgres, available only on PlanetScale's cloud services, not as a standalone local extension. It supports boolean, phrase, fuzzy, wildcard, regex queries, BM25 scoring, COUNT(*), and concurrent writes. Its key architectural choice is using Postgres ctids as document identifiers, enabling two-level bitmap encoding and AVX-512 vectorized operations that skip decoding irrelevant pages. Benchmarks on 85 GB Stack Exchange data (150M documents) show TIN building indexes in 8 minutes (50.7 GB) and handling 199 mixed queries/sec read-only vs. ParadeDB's 7.9, with 256ms p99 vs. 6.7s. TIN maintained 172 QPS under 271K concurrent updates, outperforming ParadeDB and pg_textsearch. Postgres GIN failed on disjunction queries due to memory limits.

What commenters are saying

Commenters primarily note that TIN is proprietary and only available on PlanetScale's hosted Postgres, not as a downloadable extension with the same performance. The local version (Lead) is for testing syntax only. This vendor lock-in leaves a bad taste for some, though others accept it as common in cloud databases. Several commenters discuss whether integrated FTS has matured enough to replace external Lucene/Elasticsearch; TIN's developers argue yes, eliminating sync and operational problems. Some debate whether LLM-assisted coding accelerated these implementations, but others credit deep Postgres internals expertise.