~/talk

Developing PostgreSQL Extensions in C: Hooks, Shared Memory & Best Practices

Talkat PGConf India 2026 · 2026-03-11..03-13· [databases]
links:none on file
slides:none on file

Shows a concrete extension called vacuum_booster that hooks the executor, allocates a shared-memory “global brain” (prototype tracks 1,000 tables), and spawns a background monitor that creates dynamic workers to proactively vacuum tables once a per-table bloat threshold triggers. Implements registration via _PG_init and shared_preload_libraries, ships control/.sql/.c and a Makefile, uses LWLocks for protection, validates OIDs, makes workers signal-aware, and logs with elog; demonstration claims successful cleanup by dynamic workers and complements autovacuum.

AI-written summary · about

  1. 0:00Introduction to PostgreSQL extensions
  2. 3:34Why use PostgreSQL extensions
  3. 8:49Extension architecture and structure
  4. 13:01Vacuum booster extension design
  5. 21:06Implementing the control file
  6. 22:30Creating the SQL interface
  7. 23:31Hooking into PostgreSQL internals
  8. 26:00Shared memory and background workers
  9. 27:41Executor flow inspection
  10. 28:44Monitoring and cleanup workers
  11. 31:09Best practices for extension development
  12. 34:12Q&A and summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.