~/talk

Designing for Document Databases in PostgreSQL

Talkat POSETTE: An Event for Postgres 2025 · 2025-06-10..06-12· [databases]
slides:none on file

DocumentDB is built as a PostgreSQL extension that removes SQL text translation by using the planner hook to feed aggregation pipelines directly to Postgres, achieves 50% improvement on simple scans, stores documents as BSON storage to avoid transcoding, and implements wildcard, multi-valued indexes on a RUM-backed GIN operator class. Planner and RelPathlist hooks eliminate redundant runtime checks (index 66 ms vs 30 s reduced to 136 ms), TTL uses pg_cron, and the extension-path preserves PostgreSQL features like unique constraints and ORDER BY.

AI-written summary · about

  1. 0:00Introduction
  2. 1:28What are Document DBs
  3. 4:45Building Queries
  4. 8:57Indexing & Query
  5. 14:05Expressing Filters
  6. 22:00Removing Redundant Clauses
  7. 24:32Performance (JSONB vs BSON)
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.