Background workers
API for extension and core background worker processes, including dynamically registered workers. Introduced in PostgreSQL 9.3.
Versions
- PostgreSQL 19 · shipped · improved · moderate · 4 commits · +303 / -16 lines
- PostgreSQL 17 · shipped · improved · minor · 7 commits · +247 / -56 lines
- PostgreSQL 16 · worked-on · improved · minor
Threads
- BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE
- Fix race in background worker termination for database
- [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
- Logical replication launcher did not automatically restart when got SIGKILL
- Fix background workers not restarting with restart_after_crash = on
- Switch background worker on/off in runtime.
- prevent non-superuser terminate bgworker running as superuser
- Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
- Support worker_spi to execute the function dynamically.
- [PATCH] Extend the length of BackgroundWorker.bgw_library_name
- Background worker docs,
- Is Backgroundworker.bgw_restart_time is defined in seconds?
- Dubious assertion in RegisterDynamicBackgroundWorker
- Preventing hangups in bgworker start/stop during DB shutdown
- [PATCH] Sanity check BackgroundWorker's function entry
- Correction For PostgreSQL Manual
- Missed check for too-many-children in bgworker spawning
- Configuring bgw_restart_time
- Race condition in WaitForBackgroundWorkerStartup
- Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP
- Document WaitForBackgroundWorkerShutdown and fix bgworker typo
- parallel.c oblivion of worker-startup failures
- worker_spi example BGW code GUC tweak
- Signals in a BGW
- dynamic background workers