~/talk

Taking advantage of custom background workers

Talkat PostgresOpen 2013 · 2013-09-16..09-18· [databases]
links:none on file
slides:none on file

Custom background workers run continuous daemon code inside Postgres with direct access to databases, shared memory and transactions and they are powerful but risky. The talk demonstrates a working hello world worker that logs every 10s using latches and signal handling, and a working kill_idle worker that kills idle connections (default threshold 5s) built with the bgworker.h APIs, SPI calls, custom GUCs and shared_preload_libraries. Notes include PG_MODULE_MAGIC, restart flags, and that 9.4 introduces max_worker_processes=8 to limit process counts.

AI-written summary · about

  1. 0:00Custom background workers intro
  2. 2:18PostgreSQL background workers
  3. 8:45Internal structure and APIs
  4. 12:39Basic worker implementation
  5. 26:04Best practices and pitfalls
  6. 37:48Advanced use cases
  7. 49:23Error handling and stability
  8. 51:06Real-world: killing idle connections
  9. 55:42Future of PostgreSQL workers
  10. 59:16Conclusion
~/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.