pg-durable-sql

Generate pg_durable SQL graphs for PostgreSQL workflows with checkpointing.

2.7k|71|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/microsoft/pg_durable --skill pg-durable-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pg-durable-sql
Source: https://github.com/microsoft/pg_durable/tree/main/.agents/skills/pg-durable-sql
Command: npx skills add https://github.com/microsoft/pg_durable --skill pg-durable-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Durable SQL graph generation and orchestration for PostgreSQL workflows, enabling checkpointing and seamless resume after crashes without external services.

Core Features & Use Cases

  • DSL-based graph construction using df.* operators (start, wait, http, signals, etc.)
  • Support for parallel, race, conditional branches, loops, and variable substitution
  • Pre-start variable setting via df.setvar and result captures via |=>, with system vars like {sys_*}
  • Use cases include ETL pipelines, long-running data processing, scheduled maintenance, and event-driven micro-workflows inside PostgreSQL
  • Examples: sequential ETL, parallel fan-out/fan-in, and signal-based approvals

Quick Start

Create a simple durable workflow by composing SQL nodes and starting it with df.start.

Frequently Asked Questions about pg-durable-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate durable PostgreSQL workflows with checkpointing and restart after failures?

Durable PostgreSQL workflows use a SQL-based DSL with df.* operators to build execution graphs, enabling checkpointing and seamless resume after crashes without external services. You compose nodes using df.start to initiate the workflow.

How does variable substitution work in SQL workflow orchestration?

Variable substitution in SQL workflow orchestration requires setting variables via df.setvar before starting the workflow with df.start. Result captures use |=> syntax, and system variables like {sys_*} are supported for dynamic value passing across nodes.

Can I build parallel and conditional execution branches in PostgreSQL SQL workflows?

PostgreSQL SQL workflows support parallel fan-out/fan-in, race conditions, conditional branches, and loops within the DSL graph. These constructs enable complex ETL pipelines, event-driven micro-workflows, and scheduled maintenance tasks directly inside the database.

What are the syntax rules for writing correct DSL expressions in durable SQL graphs?

DSL expressions in durable SQL graphs must be TEXT type, with variables set before df.start and proper escaping applied. The Skill enforces these rules and provides a complete operator and function reference for building production-grade workflows.

Do I need external orchestration services to run scheduled maintenance and ETL pipelines in PostgreSQL?

No external orchestration services are needed for scheduled maintenance and ETL pipelines in PostgreSQL. The durable SQL DSL supports cron scheduling, HTTP calls, and signals natively, enabling checkpointing and crash recovery entirely within the database.

Why does my durable SQL workflow fail when variables are not set before df.start?

Durable SQL workflows require all variables to be initialized via df.setvar before calling df.start. This ensures proper state checkpointing and variable substitution during execution, preventing failures caused by undefined references in the workflow graph.