~/talk

How does PostgreSQL actually work

Talkat PGConf Silicon Valley 2016 · 2016-11-14..11-16· [databases]
slides:none on file

PostgreSQL is about 880,000 lines of code (≈730k C) and processes a query by passing the SQL string from psql through libpq protocol messages (Q, T, D, Z), parsing with flex/bison into a parse tree, doing name/type resolution, expanding views/rules, and feeding the planner which chooses a concrete plan (e.g. hash join, hash aggregate, sort) based on statistics and cost parameters. The executor pulls tuples through access methods (heap/index), heap updates write new tuples and emit WAL/xlog records that get fsynced on commit; use tcpdump/wireshark, EXPLAIN/ANALYZE and pg_filedump to inspect behavior.

AI-written summary · about

  1. 0:00Intro
  2. 1:55query
  3. 8:42frontend/backend protocol
  4. 12:01lexical analysis
  5. 13:40parsing
  6. 14:01parse tree
  7. 15:29parse analysis
  8. 16:41rewriting
  9. 18:03planning/optimizing
  10. 19:09plan tree
  11. 22:31execution
  12. 27:06access methods
  13. 29:17function/operator calls
  14. 35:14WAL logging
  15. 37:53the pieces of PostgreSQL
  16. 43:37storage management
~/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.