pg_background_queue
Topic-aware background SQL task queue with concurrency limits and retries.
pg_background_queue · Topic-aware background SQL task queue with concurrency limits and retries.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101900 | pg_background_queue | pg_background_queue | 1.0 | TIME | GPL-3.0 | C |
PostgreSQL · 13, 14, 15, 16, 17, 18
Usage
Sources:
pg_background_queue Topic-aware background SQL task queue with concurrency limits and retries.
Enablement
Merge pg_background_queue into the existing preload list, restart PostgreSQL, and then create pg_background_queue in each database that needs its SQL objects:
Core Workflow
The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.
Main Objects
The reviewed install surface includes these prominent objects:
| Object | Kind | Operational role |
|---|---|---|
pg_background_tasks | TABLE | Extension-owned table; account for its data in backup and upgrades. |
pg_background_enqueue | FUNCTION | Callable function from the reviewed install surface. |
pg_background_queue_ensure_workers | FUNCTION | Callable function from the reviewed install surface. |
pg_background_queue_calibrate_workers_count | FUNCTION | Callable function from the reviewed install surface. |
pg_background_queue_active_workers_count | FUNCTION | Callable function from the reviewed install surface. |
pg_background_queue_task_state | TYPE | User-facing data type created by the extension. |
Operations and Boundaries
- The verified PostgreSQL-major evidence covers 13, 14, 15, 16, 17, 18; do not infer unlisted majors.
- Preloading
pg_background_queuechanges cluster startup state; stage configuration and restart changes separately fromCREATE EXTENSION.