pg_dispatch
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_dispatch | 0.1.5 | TIME | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1100 | pg_dispatch | No | No | No | Yes | No | No | - |
| Related | pgcrypto pg_cron pg_cron pg_task pgagent pg_later pg_dbms_job pg_background pg_durable pg_jobmon omni_worker |
|---|
Pure SQL extension; runtime also needs pgcrypto from contrib in addition to pg_cron.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.5 | 1817161514 | pg_dispatch | pgcrypto, pg_cron |
| RPM | PIGSTY | 0.1.5 | 1817161514 | pg_dispatch_$v | - |
| DEB | PIGSTY | 0.1.5 | 1817161514 | postgresql-$v-pg-dispatch | postgresql-$v-cron |
Build
You can build the RPM / DEB packages for pg_dispatch using pig build:
Install
You can install pg_dispatch directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Source: README, database.dev page
pg_dispatch is a TLE-compatible async SQL dispatcher built on pg_cron. It is intended for deferring side effects out of the caller’s main transaction in sandboxed environments such as RDS or Supabase.
Requirements and install
- PostgreSQL 13+
pg_cron1.5.0+pgcrypto
The extension installs into the pgdispatch schema.
Main functions
pgdispatch.fire(command text): enqueue SQL for immediate async execution.pgdispatch.snooze(command text, delay interval): enqueue SQL for delayed async execution.
Typical use
The official README positions pg_dispatch for PL/pgSQL or trigger-based workflows where a foreground RPC should commit quickly while notifications, analytics updates, or other expensive SQL run later in a separate transaction.
Caveats
- The runtime dependency on
pgcryptois in addition topg_cron. - The
delayargument truncates to seconds precision. - The project documents TLE/database.dev installation first; manual PGXN installation is also linked from the README.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)