Skip to content
ulak

ulak

ulak : Transactional Outbox extension for PostgreSQL with reliable asynchronous delivery

Overview

ID Extension Package Version Category License Language
2680
ulak
ulak
0.0.2
FEAT
Apache-2.0
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--sLd--
No
Yes
Yes
Yes
no
no
Relationships
Schemas ulak

preload required; rm README from RPM/DEB

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
0.0.2
18
17
16
15
14
ulak -
RPM
PIGSTY
0.0.2
18
17
16
15
14
ulak_$v -
DEB
PIGSTY
0.0.2
18
17
16
15
14
postgresql-$v-ulak -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
el8.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
el9.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
el9.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
el10.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
el10.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
d12.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
d12.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
d13.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
d13.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u22.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u22.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u24.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u24.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u26.x86_64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
u26.aarch64
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
PIGSTY 0.0.2
Package Version OS ORG SIZE File URL
ulak_18 0.0.2 el8.x86_64 pigsty 107.7 KiB ulak_18-0.0.2-1PIGSTY.el8.x86_64.rpm
ulak_18 0.0.2 el8.aarch64 pigsty 106.0 KiB ulak_18-0.0.2-1PIGSTY.el8.aarch64.rpm
ulak_18 0.0.2 el9.x86_64 pigsty 105.3 KiB ulak_18-0.0.2-1PIGSTY.el9.x86_64.rpm
ulak_18 0.0.2 el9.aarch64 pigsty 104.3 KiB ulak_18-0.0.2-1PIGSTY.el9.aarch64.rpm
ulak_18 0.0.2 el10.x86_64 pigsty 105.5 KiB ulak_18-0.0.2-1PIGSTY.el10.x86_64.rpm
ulak_18 0.0.2 el10.aarch64 pigsty 104.3 KiB ulak_18-0.0.2-1PIGSTY.el10.aarch64.rpm
postgresql-18-ulak 0.0.2 d12.x86_64 pigsty 273.7 KiB postgresql-18-ulak_0.0.2-2PIGSTY~bookworm_amd64.deb
postgresql-18-ulak 0.0.2 d12.aarch64 pigsty 266.9 KiB postgresql-18-ulak_0.0.2-2PIGSTY~bookworm_arm64.deb
postgresql-18-ulak 0.0.2 d13.x86_64 pigsty 298.2 KiB postgresql-18-ulak_0.0.2-2PIGSTY~trixie_amd64.deb
postgresql-18-ulak 0.0.2 d13.aarch64 pigsty 291.0 KiB postgresql-18-ulak_0.0.2-2PIGSTY~trixie_arm64.deb
postgresql-18-ulak 0.0.2 u22.x86_64 pigsty 288.2 KiB postgresql-18-ulak_0.0.2-2PIGSTY~jammy_amd64.deb
postgresql-18-ulak 0.0.2 u22.aarch64 pigsty 284.2 KiB postgresql-18-ulak_0.0.2-2PIGSTY~jammy_arm64.deb
postgresql-18-ulak 0.0.2 u24.x86_64 pigsty 305.9 KiB postgresql-18-ulak_0.0.2-2PIGSTY~noble_amd64.deb
postgresql-18-ulak 0.0.2 u24.aarch64 pigsty 302.1 KiB postgresql-18-ulak_0.0.2-2PIGSTY~noble_arm64.deb
postgresql-18-ulak 0.0.2 u26.x86_64 pigsty 304.3 KiB postgresql-18-ulak_0.0.2-2PIGSTY~resolute_amd64.deb
postgresql-18-ulak 0.0.2 u26.aarch64 pigsty 299.9 KiB postgresql-18-ulak_0.0.2-2PIGSTY~resolute_arm64.deb

Source

pig build pkg ulak;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install ulak;		# install via package name, for the active PG version

pig install ulak -v 18;   # install for PG 18
pig install ulak -v 17;   # install for PG 17
pig install ulak -v 16;   # install for PG 16
pig install ulak -v 15;   # install for PG 15
pig install ulak -v 14;   # install for PG 14

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'ulak';

Create this extension with:

CREATE EXTENSION ulak;

Usage

Sources: README, wiki, v0.0.2 release

ulak implements the transactional outbox pattern inside PostgreSQL. Messages are inserted transactionally, then background workers deliver them asynchronously with retries, circuit breaking, and dead-letter handling.

Enable the Extension

-- postgresql.conf
shared_preload_libraries = 'ulak'

CREATE EXTENSION ulak;

The README also shows setting ulak.database when running the included Docker example.

Define Endpoints and Send Messages

SELECT ulak.create_endpoint(
  'my-webhook',
  'http',
  '{"url":"https://httpbin.org/post","method":"POST"}'::jsonb
);

BEGIN;
  INSERT INTO orders (id, total) VALUES (1, 99.99);
  SELECT ulak.send('my-webhook', '{"order_id":1,"total":99.99}'::jsonb);
COMMIT;

The same API pattern is documented for kafka, mqtt, redis, amqp, and nats endpoints.

Delivery Controls and Pub/Sub

SELECT ulak.send_with_options(
  'my-webhook',
  '{"event":"order.created"}'::jsonb,
  5,
  NOW() + INTERVAL '10 minutes',
  'order-123-created',
  '550e8400-e29b-41d4-a716-446655440000'::uuid,
  NOW() + INTERVAL '1 hour',
  'order-123'
);

SELECT ulak.send_batch('my-webhook', ARRAY['{"id":1}'::jsonb, '{"id":2}'::jsonb]);

SELECT ulak.create_event_type('order.created', 'New order placed');
SELECT ulak.subscribe('order.created', 'my-webhook');
SELECT ulak.publish('order.created', '{"order_id":123}'::jsonb);

Monitoring and Recovery

SELECT * FROM ulak.health_check();
SELECT * FROM ulak.get_worker_status();
SELECT * FROM ulak.get_endpoint_health();
SELECT * FROM ulak.dlq_summary();

SELECT ulak.redrive_message(42);
SELECT ulak.redrive_endpoint('my-webhook');
SELECT ulak.redrive_all();
SELECT ulak.replay_message(100);

Key Settings

The README highlights these ulak. GUCs:

  • workers
  • poll_interval
  • batch_size
  • max_queue_size
  • circuit_breaker_threshold
  • circuit_breaker_cooldown
  • http_timeout
  • dlq_retention_days

The v0.0.2 release notes only document a Docker publish workflow fix, so the current README and wiki remain the authoritative user-facing usage sources.

Last updated on