pg_later
pg_later
pg_later : Run queries now and get results later
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1090 | pg_later | pg_later | 0.4.0 | TIME | PostgreSQL | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | pglater |
| Requires | pgmq |
| See Also | pg_cron pg_task pg_background timescaledb timescaledb_toolkit timeseries periods temporal_tables |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.4.0 | 18 17 16 15 14 | pg_later | pgmq |
| RPM | PIGSTY | 0.4.0 | 18 17 16 15 14 | pg_later_$v | pgmq_$v |
| DEB | PIGSTY | 0.4.0 | 18 17 16 15 14 | postgresql-$v-pg-later | postgresql-$v-pgmq |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
el8.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
el9.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
el9.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
el10.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
el10.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
d12.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
d12.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
d13.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
d13.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
u22.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
u22.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
u24.x86_64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
u24.aarch64 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 | PIGSTY 0.4.0 |
Source
pig build pkg pg_later;# build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_later;# install via package name, for the active PG version pig install pg_later -v 18; # install for PG 18 pig install pg_later -v 17; # install for PG 17 pig install pg_later -v 16; # install for PG 16 pig install pg_later -v 15; # install for PG 15 pig install pg_later -v 14; # install for PG 14Config this extension to shared_preload_libraries:
shared_preload_libraries = 'pg_later';Create this extension with:
CREATE EXTENSION pg_later CASCADE; -- requires pgmqUsage
A PostgreSQL extension to execute queries asynchronously. Built on pgmq.
Getting Started
Initialize the extension’s backend:
CREATE EXTENSION pg_later CASCADE; SELECT pglater.init();Execute a SQL query now:
SELECT pglater.exec( 'SELECT * FROM pg_available_extensions ORDER BY name LIMIT 2' ) AS job_id; job_id -------- 1Come back at some later time, and retrieve the results by providing the job id:
SELECT pglater.fetch_results(1);{ "query": "select * from pg_available_extensions order by name limit 2", "job_id": 1, "result": [ { "name": "adminpack", "comment": "administrative functions for PostgreSQL", "default_version": "2.1", "installed_version": null }, { "name": "amcheck", "comment": "functions for verifying relation integrity", "default_version": "1.3", "installed_version": null } ], "status": "success" }Last updated on