Hasty Briefsbeta

Bilingual

Tin: full-text search for Postgres

6 hours ago
  • TIN is a new full-text search extension for Postgres, announced as GA for all Postgres and Neki databases.
  • It supports boolean expressions, phrase/span queries, fuzzy/wildcard/regex matching, case/accent folding, COUNT(*) queries, and BM25-scored top-k queries.
  • TIN uses Postgres ctid values as document identifiers, enabling vectorized bitmap operations and avoiding ID renumbering during segment merges.
  • In benchmarks, TIN outperforms ParadeDB, pg_textsearch, and Postgres GIN by at least 8× in read throughput, with lower latency and less disk I/O even under concurrent writes.
  • It handles mixed query types (conjunction, disjunction, phrase) with top-k ranking or counting, and supports MVCC-correct results and continuous updates.
  • Key architectural advantages include page-level and offset-level bitmaps that fit in AVX/AVX-512 registers, eliding postings list decoding, and using the visibility map for index-only scans.
  • TIN index builds are faster (8 min vs 19-129 min for competitors) and require less RAM (32 GB vs 64-128 GB) for the same corpus.