pg_settimeout
pg_settimeout · Delayed and repeating SQL tasks in background workers
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102191 | pg_settimeout | pg_settimeout | 1.1 | ADMIN | MIT | C |
PostgreSQL · 9.6, 10, 11
Usage
Sources:
pg_settimeout starts dynamic background workers to execute SQL after a delay. Upstream reports testing on PostgreSQL 9.6, 10 and 11; compatibility with later majors is unverified.
Core Workflow
Operational Boundaries
pg_settimeout(query, timeout) runs once; pg_setinterval(query, timeout) repeats indefinitely. The timeout is in milliseconds and the result is the worker PID. Workers connect to the current database as the calling user and execute in separate transactions; rolling back the scheduling transaction does not undo an independently completed task. Available worker slots limit scheduling. The module has no startup routines and needs no preload. Installation uses the control-file superuser default.