~/talk

Investigating Multithreaded PostgreSQL

Talkat PGConf.dev 2025 · 2025-05-13..05-16· [databases, concurrency]
slides:none on file

Postgres still uses a 1980s process-per-connection design and this work evaluates replacing that with threads by testing prototypes: a pg_threads.h shim, converting atomics to C11, and experiments with Heikki's branch that runs queries but crashes on heavier workloads. Async I/O patches land in Postgres 18 beta and expose cross-process completion issues. Windows fork emulation costs roughly 40 ms on a trivial parallel worker. Proposals include replacing signals with latch-driven interrupts.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:14Operating system process models
  3. 5:10Understanding fork mechanics
  4. 11:04Porting to Windows
  5. 13:14Subprocess execution
  6. 16:51Thread creation and C11
  7. 19:14Atomic operations
  8. 20:49Motivations for multithreading
  9. 23:26Asynchronous IO issues
  10. 27:14Database architectural designs
  11. 31:00Green threads and future goals
  12. 33:33Managing global state
  13. 37:07Postmaster and supervisor roles
  14. 38:27Work in progress and goals
  15. 43:58Signal removal and conclusion
~/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.