Schedule - PGConf.dev 2026

Postgres as an Execution Environment for AI Workflows: Failure Modes, Hooks, and Patchable Primitives

Date: 2026-05-21
Time: 14:00–14:50
Room: Labatt (1700)
Level: Intermediate
Feedback: Leave feedback

PostgreSQL is increasingly used as more than a datastore: it’s becoming an execution environment for AI-adjacent workflows—embedding generation, hybrid retrieval, reranking, moderation checks, enrichment, and policy-aware automation. The attraction is obvious: SQL, transactions, row-level security, and auditable change control.

The production reality is also obvious: the first time a database session calls “outside,” we inherit distributed-systems problems inside a system optimized for deterministic local execution.

This talk catalogs the most common failure modes we see when teams implement AI workflows around Postgres: • slow/failed external calls from within transactions • retry storms and rate limits causing database-wide degradation • inconsistent writes without idempotency • governance blind spots (which query triggered which external call with what data?) • observability gaps across database ↔ service boundaries

We’ll walk through concrete implementation patterns (PL languages, background workers, NOTIFY/LISTEN, queues, extension hooks), then propose a set of patchable primitives that would improve safety and standardization without “adding AI to core”: • an outbound-call abstraction with budgets, circuit breaking, structured retries, and cancellation semantics • an official lineage/tracing hook so external interactions can be tied back to query/user/role • stronger permission boundaries for “show me the internet” capabilities • workload shaping signals (rate control, backpressure, isolation) that operators can reason about

The goal is to turn today’s ad-hoc patterns into something repeatable: safer defaults, clearer interfaces, and small steps the community can actually implement.

Speaker

Vibhor Kumar