[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[world-postgres] Bootstrap graphile-worker schema in setup CLI - #2019

Merged
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema
May 19, 2026
Merged

[world-postgres] Bootstrap graphile-worker schema in setup CLI#2019
TooTallNate merged 3 commits into
mainfrom
peter/setup-graphile-worker-schema

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

workflow-postgres-setup now installs the graphile_worker schema in addition to the drizzle migrations. Once both schemas exist, later world.start() calls find them present and skip the racing DDL path entirely.

Why

E2E Local Postgres Tests was flaking on a fresh DB because two processes — the vitest test runner (which initializes a postgres world because WORKFLOW_TARGET_WORLD=@workflow/world-postgres is set) and the workbench dev server — both lazily call world.start() and race in graphile-worker's installSchema. PostgreSQL's CREATE SCHEMA IF NOT EXISTS is not race-safe across concurrent sessions: both can pass the MVCC-snapshotted existence check and one then fails with duplicate key value violates unique constraint "pg_namespace_nspname_index".

Since CI already runs ./packages/world-postgres/bin/setup.js once before either process starts (the Setup PostgreSQL Database step in tests.yml), the cleanest fix is to do the graphile-worker bootstrap there — single-process, serialized, and consumer-agnostic. No lock, no migration changes, no production code path touched.

Alternative to #1966.

Verification

  • pnpm --filter @workflow/world-postgres typecheck
  • pnpm --filter @workflow/world-postgres build
  • pnpm --filter @workflow/world-postgres test ✓ (104 pass; one pre-existing failure in storage.test.ts > should enforce token uniqueness across different runs is also failing on main, unrelated to this change)
  • Race repro against a fresh postgres:18-alpine: 8 parallel makeWorkerUtils({pgPool}).migrate() calls. Without the pre-bootstrap, 7/8 fail with pg_namespace_nspname_index. After running the patched workflow-postgres-setup first, 0/8 fail.

`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3270e3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/world-postgresPatch
tarballsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.033s (-23.0% 🟢)1.005s (~)0.972s101.00x
💻 LocalExpress0.035s (-20.3% 🟢)1.009s (~)0.974s101.06x
💻 LocalNext.js (Turbopack)0.047s1.006s0.959s101.41x
🐘 PostgresExpress0.050s (-13.8% 🟢)1.013s (~)0.963s101.51x
🐘 PostgresNitro0.051s (-46.6% 🟢)1.011s (-3.1%)0.960s101.53x
🐘 PostgresNext.js (Turbopack)0.059s1.012s0.953s101.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.281s (+11.8% 🔺)2.669s (+14.4% 🔺)2.388s101.00x
▲ VercelNitro0.329s (-19.6% 🟢)2.720s (+8.4% 🔺)2.391s101.17x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.071s (-4.8%)2.006s (~)0.935s101.00x
🐘 PostgresNitro1.083s (-5.0% 🟢)2.009s (~)0.926s101.01x
🐘 PostgresExpress1.087s (-5.1% 🟢)2.010s (~)0.922s101.02x
🐘 PostgresNext.js (Turbopack)1.115s2.009s0.894s101.04x
💻 LocalNext.js (Turbopack)1.125s2.006s0.881s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.573s (-59.6% 🟢)3.480s (-41.1% 🟢)1.908s101.00x
▲ VercelNext.js (Turbopack)2.139s (+5.1% 🔺)4.331s (+13.1% 🔺)2.191s101.36x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.390s (-5.1% 🟢)11.023s (~)0.632s31.00x
🐘 PostgresNitro10.392s (-4.4%)11.014s (~)0.622s31.00x
💻 LocalExpress10.414s (-4.7%)11.023s (~)0.609s31.00x
🐘 PostgresExpress10.446s (-4.7%)11.017s (~)0.571s31.01x
💻 LocalNext.js (Turbopack)10.678s11.022s0.343s31.03x
🐘 PostgresNext.js (Turbopack)10.732s11.019s0.287s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.488s (-22.1% 🟢)15.488s (-20.2% 🟢)2.000s21.00x
▲ VercelNitro13.950s (-41.2% 🟢)16.106s (-35.9% 🟢)2.156s21.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.422s (-8.0% 🟢)14.017s (-6.7% 🟢)0.595s51.00x
💻 LocalExpress13.423s (-10.3% 🟢)14.028s (-6.7% 🟢)0.606s51.00x
💻 LocalNitro13.427s (-10.9% 🟢)14.027s (-12.5% 🟢)0.600s51.00x
🐘 PostgresExpress13.477s (-7.6% 🟢)14.017s (-6.7% 🟢)0.540s51.00x
💻 LocalNext.js (Turbopack)14.095s15.030s0.935s41.05x
🐘 PostgresNext.js (Turbopack)14.196s15.018s0.822s41.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.906s (-66.0% 🟢)24.192s (-63.7% 🟢)2.286s31.00x
▲ VercelNext.js (Turbopack)22.227s (-57.7% 🟢)24.081s (-55.9% 🟢)1.854s31.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.842s (-29.4% 🟢)12.022s (-29.4% 🟢)0.180s81.00x
💻 LocalExpress11.873s (-28.5% 🟢)12.022s (-29.4% 🟢)0.149s81.00x
🐘 PostgresNitro11.905s (-14.8% 🟢)12.141s (-15.2% 🟢)0.236s81.01x
🐘 PostgresExpress12.025s (-14.2% 🟢)12.518s (-14.2% 🟢)0.494s81.02x
💻 LocalNext.js (Turbopack)13.059s13.884s0.824s71.10x
🐘 PostgresNext.js (Turbopack)13.344s14.015s0.671s71.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.508s (-92.1% 🟢)35.504s (-91.6% 🟢)1.995s31.00x
▲ VercelNext.js (Turbopack)34.514s (-91.2% 🟢)36.874s (-90.7% 🟢)2.360s31.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-10.8% 🟢)2.007s (~)0.870s151.00x
🐘 PostgresExpress1.145s (-9.2% 🟢)2.008s (~)0.863s151.01x
💻 LocalNitro1.169s (-28.3% 🟢)2.006s (-3.3%)0.836s151.03x
💻 LocalExpress1.170s (-21.4% 🟢)2.006s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.200s2.007s0.807s151.06x
💻 LocalNext.js (Turbopack)1.298s2.006s0.708s151.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.605s (-23.3% 🟢)4.033s (-18.2% 🟢)1.428s81.00x
▲ VercelNitro2.739s (-2.8%)4.921s (+13.9% 🔺)2.182s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (-49.4% 🟢)2.007s (-33.3% 🟢)0.817s151.00x
🐘 PostgresExpress1.198s (-49.3% 🟢)2.008s (-33.3% 🟢)0.810s151.01x
🐘 PostgresNext.js (Turbopack)1.344s2.008s0.664s151.13x
💻 LocalNitro1.681s (-46.5% 🟢)2.006s (-48.4% 🟢)0.325s151.41x
💻 LocalExpress1.690s (-42.8% 🟢)2.005s (-41.9% 🟢)0.316s151.42x
💻 LocalNext.js (Turbopack)1.855s2.074s0.219s151.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.787s (-46.7% 🟢)5.837s (-34.5% 🟢)2.050s61.00x
▲ VercelNitro4.950s (+22.2% 🔺)6.840s (+15.5% 🔺)1.889s51.31x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.304s (-62.6% 🟢)2.007s (-50.0% 🟢)0.702s151.00x
🐘 PostgresNitro1.307s (-62.4% 🟢)2.007s (-49.9% 🟢)0.700s151.00x
🐘 PostgresNext.js (Turbopack)1.624s2.006s0.382s151.25x
💻 LocalExpress4.462s (-46.5% 🟢)5.178s (-42.6% 🟢)0.716s63.42x
💻 LocalNitro4.494s (-46.2% 🟢)5.015s (-44.4% 🟢)0.522s63.45x
💻 LocalNext.js (Turbopack)5.664s6.013s0.350s54.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.362s (-39.9% 🟢)7.354s (-32.9% 🟢)1.992s51.00x
▲ VercelNitro5.779s (+63.9% 🔺)7.858s (+42.0% 🔺)2.078s41.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.137s (-9.5% 🟢)2.008s (~)0.870s151.00x
🐘 PostgresExpress1.146s (-8.8% 🟢)2.009s (~)0.863s151.01x
🐘 PostgresNext.js (Turbopack)1.223s2.008s0.785s151.08x
💻 LocalNext.js (Turbopack)1.332s2.006s0.674s151.17x
💻 LocalExpress1.373s (-27.5% 🟢)2.006s (-15.1% 🟢)0.633s151.21x
💻 LocalNitro1.384s (-25.8% 🟢)2.006s (-14.3% 🟢)0.622s151.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.648s (+7.7% 🔺)4.419s (+6.0% 🔺)1.771s71.00x
▲ VercelNext.js (Turbopack)2.730s (-6.9% 🟢)4.438s (-4.4%)1.708s71.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.196s (-48.9% 🟢)2.009s (-33.3% 🟢)0.814s151.00x
🐘 PostgresNitro1.213s (-48.1% 🟢)2.008s (-33.3% 🟢)0.795s151.01x
🐘 PostgresNext.js (Turbopack)1.339s2.008s0.668s151.12x
💻 LocalExpress1.862s (-40.6% 🟢)2.152s (-42.8% 🟢)0.290s141.56x
💻 LocalNitro1.916s (-37.5% 🟢)2.315s (-40.4% 🟢)0.400s131.60x
💻 LocalNext.js (Turbopack)2.074s2.825s0.751s111.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.527s (+9.1% 🔺)5.580s (+9.9% 🔺)2.052s61.00x
▲ VercelNext.js (Turbopack)3.580s (+13.9% 🔺)5.516s (+22.0% 🔺)1.936s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.331s (-62.0% 🟢)2.007s (-50.0% 🟢)0.676s151.00x
🐘 PostgresNitro1.341s (-61.5% 🟢)2.007s (-49.9% 🟢)0.666s151.01x
🐘 PostgresNext.js (Turbopack)1.632s2.076s0.444s151.23x
💻 LocalExpress4.644s (-47.2% 🟢)5.346s (-42.3% 🟢)0.702s63.49x
💻 LocalNitro5.128s (-43.9% 🟢)5.679s (-43.3% 🟢)0.551s63.85x
💻 LocalNext.js (Turbopack)6.040s6.415s0.375s54.54x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.407s (+6.2% 🔺)7.317s (+7.3% 🔺)1.910s51.00x
▲ VercelNext.js (Turbopack)5.743s (-15.0% 🟢)7.770s (-9.1% 🟢)2.028s41.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.431s (-47.5% 🟢)1.007s (~)0.576s601.00x
💻 LocalNitro0.453s (-53.8% 🟢)1.004s (-8.2% 🟢)0.551s601.05x
🐘 PostgresExpress0.461s (-45.0% 🟢)1.006s (-1.6%)0.545s601.07x
💻 LocalExpress0.534s (-45.7% 🟢)1.005s (-6.6% 🟢)0.471s601.24x
🐘 PostgresNext.js (Turbopack)0.694s1.007s0.313s601.61x
💻 LocalNext.js (Turbopack)0.731s1.005s0.274s601.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.223s (-76.3% 🟢)7.310s (-69.6% 🟢)2.087s91.00x
▲ VercelNext.js (Turbopack)5.391s (-62.8% 🟢)7.253s (-54.9% 🟢)1.862s91.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.050s (-45.5% 🟢)1.532s (-27.1% 🟢)0.482s591.00x
🐘 PostgresExpress1.114s (-43.7% 🟢)1.882s (-16.7% 🟢)0.768s481.06x
💻 LocalNitro1.151s (-62.1% 🟢)2.006s (-46.6% 🟢)0.855s451.10x
💻 LocalExpress1.231s (-59.2% 🟢)2.006s (-44.1% 🟢)0.775s451.17x
🐘 PostgresNext.js (Turbopack)1.647s2.008s0.361s451.57x
💻 LocalNext.js (Turbopack)1.771s2.006s0.234s451.69x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.987s (-71.9% 🟢)16.045s (-69.0% 🟢)2.058s61.00x
▲ VercelNitro14.213s (-64.0% 🟢)16.636s (-59.7% 🟢)2.423s61.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.965s (-52.1% 🟢)2.334s (-49.3% 🟢)0.369s521.00x
🐘 PostgresExpress2.310s (-42.1% 🟢)2.865s (-34.4% 🟢)0.555s421.18x
💻 LocalNitro2.639s (-71.6% 🟢)3.007s (-70.0% 🟢)0.369s401.34x
💻 LocalExpress2.671s (-71.0% 🟢)3.007s (-70.0% 🟢)0.337s401.36x
🐘 PostgresNext.js (Turbopack)3.228s4.009s0.781s301.64x
💻 LocalNext.js (Turbopack)3.797s4.042s0.244s301.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.055s (-59.8% 🟢)45.914s (-57.8% 🟢)2.859s31.00x
▲ VercelNitro44.032s (-54.6% 🟢)46.346s (-52.9% 🟢)2.314s31.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.4% 🟢)1.005s (~)0.842s601.00x
🐘 PostgresExpress0.180s (-36.2% 🟢)1.006s (~)0.826s601.10x
🐘 PostgresNext.js (Turbopack)0.242s1.006s0.764s601.48x
💻 LocalNitro0.430s (-28.8% 🟢)1.004s (-1.7%)0.574s602.63x
💻 LocalExpress0.433s (-22.7% 🟢)1.004s (~)0.571s602.65x
💻 LocalNext.js (Turbopack)0.527s1.005s0.478s603.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.504s (+50.8% 🔺)4.393s (+31.1% 🔺)1.889s141.00x
▲ VercelNext.js (Turbopack)2.853s (+41.1% 🔺)4.866s (+28.3% 🔺)2.013s131.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.277s (-44.2% 🟢)1.005s (~)0.728s901.00x
🐘 PostgresExpress0.306s (-40.0% 🟢)1.006s (~)0.701s901.10x
🐘 PostgresNext.js (Turbopack)0.461s1.007s0.546s901.66x
💻 LocalNitro2.160s (-14.9% 🟢)2.797s (-7.1% 🟢)0.636s337.80x
💻 LocalExpress2.242s (-10.8% 🟢)2.944s (-2.2%)0.702s318.09x
💻 LocalNext.js (Turbopack)2.393s3.043s0.650s308.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.857s (+174.6% 🔺)11.476s (+138.0% 🔺)2.619s81.00x
▲ VercelNext.js (Turbopack)9.358s (+164.7% 🔺)11.274s (+117.1% 🔺)1.916s81.06x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.605s (-23.5% 🟢)1.006s (~)0.401s1201.00x
🐘 PostgresExpress0.619s (-24.4% 🟢)1.006s (-1.2%)0.386s1201.02x
🐘 PostgresNext.js (Turbopack)0.955s1.387s0.432s871.58x
💻 LocalExpress9.818s (-12.3% 🟢)10.447s (-12.5% 🟢)0.629s1216.24x
💻 LocalNitro9.935s (-11.2% 🟢)10.363s (-11.2% 🟢)0.428s1216.43x
💻 LocalNext.js (Turbopack)11.658s12.326s0.668s1019.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)25.400s (+145.9% 🔺)27.854s (+126.7% 🔺)2.455s51.00x
▲ VercelNitro28.872s (+273.9% 🔺)31.370s (+233.7% 🔺)2.497s41.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.130s (+428.7% 🔺)2.005s (+99.6% 🔺)0.010s (-16.8% 🟢)2.018s (+98.0% 🔺)0.888s101.00x
💻 LocalExpress1.131s (+468.0% 🔺)2.005s (+99.6% 🔺)0.010s (-19.8% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.0% 🔺)2.001s (+100.2% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.878s101.00x
🐘 PostgresExpress1.136s (+454.1% 🔺)1.998s (+100.1% 🔺)0.001s (-18.8% 🟢)2.010s (+98.8% 🔺)0.874s101.01x
💻 LocalNext.js (Turbopack)1.184s2.004s0.013s2.020s0.836s101.05x
🐘 PostgresNext.js (Turbopack)1.199s2.002s0.001s2.012s0.813s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.488s (-63.7% 🟢)3.470s (-59.9% 🟢)1.927s (+205.0% 🔺)6.229s (-36.4% 🟢)3.741s101.00x
▲ VercelNitro3.374s (-12.0% 🟢)4.647s (-11.9% 🟢)13.573s (+1729.0% 🔺)18.776s (+189.6% 🔺)15.402s101.36x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.002s (+98.8% 🔺)0.004s (-4.9%)2.024s (+98.0% 🔺)0.526s301.00x
🐘 PostgresExpress1.526s (+142.2% 🔺)2.003s (+99.0% 🔺)0.004s (+3.6%)2.025s (+98.0% 🔺)0.499s301.02x
💻 LocalExpress1.688s (+123.0% 🔺)2.011s (+95.4% 🔺)0.009s (-9.2% 🟢)2.194s (+111.0% 🔺)0.506s291.13x
💻 LocalNitro1.693s (+101.9% 🔺)2.013s (+98.9% 🔺)0.009s (+1.4%)2.203s (+97.5% 🔺)0.510s281.13x
🐘 PostgresNext.js (Turbopack)1.735s2.010s0.004s2.026s0.291s301.16x
💻 LocalNext.js (Turbopack)1.858s2.012s0.007s2.201s0.343s281.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.979s (-79.7% 🟢)7.765s (-74.8% 🟢)0.320s (+185.7% 🔺)8.705s (-72.6% 🟢)2.726s71.00x
▲ VercelNext.js (Turbopack)6.050s (-64.2% 🟢)8.146s (-55.3% 🟢)0.706s (+234.0% 🔺)9.400s (-50.4% 🟢)3.350s71.01x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.653s (-32.6% 🟢)1.048s (-16.0% 🟢)0.000s (-15.8% 🟢)1.059s (-15.8% 🟢)0.406s571.00x
🐘 PostgresExpress0.656s (-31.7% 🟢)1.031s (-19.3% 🟢)0.000s (-100.0% 🟢)1.042s (-20.2% 🟢)0.386s581.01x
🐘 PostgresNext.js (Turbopack)0.771s1.053s0.000s1.064s0.293s571.18x
💻 LocalExpress1.330s (+8.6% 🔺)2.015s (~)0.000s (-60.0% 🟢)2.017s (~)0.687s302.04x
💻 LocalNitro1.338s (+9.5% 🔺)2.015s (~)0.000s (+166.7% 🔺)2.017s (~)0.679s302.05x
💻 LocalNext.js (Turbopack)1.400s2.014s0.000s2.017s0.618s302.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.065s (-60.1% 🟢)5.577s (-51.6% 🟢)0.000s (NaN%)6.184s (-48.7% 🟢)2.119s101.00x
▲ VercelNitro4.587s (+50.4% 🔺)5.840s (+32.9% 🔺)0.000s (+30.0% 🔺)6.532s (+35.8% 🔺)1.945s101.13x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.268s (-29.2% 🟢)1.869s (-12.7% 🟢)0.000s (-100.0% 🟢)1.884s (-13.3% 🟢)0.616s321.00x
🐘 PostgresExpress1.385s (-21.8% 🟢)2.000s (-8.2% 🟢)0.000s (NaN%)2.026s (-7.8% 🟢)0.641s301.09x
🐘 PostgresNext.js (Turbopack)1.646s2.225s0.000s2.232s0.586s271.30x
💻 LocalNext.js (Turbopack)2.804s3.417s0.001s3.420s0.617s182.21x
💻 LocalNitro2.977s (-12.1% 🟢)3.676s (-8.8% 🟢)0.001s (+65.4% 🔺)3.679s (-8.9% 🟢)0.702s172.35x
💻 LocalExpress3.185s (-8.2% 🟢)3.965s (-1.7%)0.000s (-53.1% 🟢)3.971s (-1.6%)0.786s162.51x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.023s (+7.2% 🔺)8.060s (+15.4% 🔺)0.000s (-100.0% 🟢)8.682s (+15.1% 🔺)2.659s71.00x
▲ VercelNitro6.543s (+59.8% 🔺)8.306s (+54.6% 🔺)0.000s (-47.6% 🟢)9.071s (+56.6% 🔺)2.529s71.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/21
🐘 PostgresNitro17/21
▲ VercelNext.js (Turbopack)11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres16/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production120002191419
✅ 💻 Local Development158702191806
✅ 📦 Local Production158702191806
✅ 🐘 Local Postgres158702191806
✅ 🪟 Windows12900129
✅ 📋 Other7270176903
Total6817010527869

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro103026
✅ example103026
✅ express103026
✅ fastify103026
✅ hono103026
✅ nextjs-turbopack12702
✅ nextjs-webpack12702
✅ nitro103026
✅ nuxt103026
✅ sveltekit12207
✅ vite103026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable104025
✅ express-stable104025
✅ fastify-stable104025
✅ hono-stable104025
✅ nextjs-turbopack-canary110019
✅ nextjs-turbopack-stable-lazy-discovery-disabled12900
✅ nextjs-turbopack-stable-lazy-discovery-enabled12900
✅ nextjs-webpack-canary110019
✅ nextjs-webpack-stable-lazy-discovery-disabled12900
✅ nextjs-webpack-stable-lazy-discovery-enabled12900
✅ nitro-stable104025
✅ nuxt-stable104025
✅ sveltekit-stable12306
✅ vite-stable104025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack12900
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable104025
✅ e2e-local-dev-tanstack-start-104025
✅ e2e-local-postgres-nest-stable104025
✅ e2e-local-postgres-tanstack-start-104025
✅ e2e-local-prod-nest-stable104025
✅ e2e-local-prod-tanstack-start-104025
✅ e2e-vercel-prod-tanstack-start103026

📋 View full workflow run

Comment thread.changeset/setup-graphile-worker-schema.md Outdated
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @workflow/world-postgres setup CLI (workflow-postgres-setup) to proactively bootstrap Graphile Worker’s database objects so concurrent world.start() calls no longer race on graphile_worker schema creation in fresh databases.

Changes:

  • Add a graphile-worker bootstrap step (makeWorkerUtils().migrate()) to the setup CLI after running Drizzle migrations.
  • Add a changeset documenting the patch release for @workflow/world-postgres.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/world-postgres/src/cli.tsRuns Graphile Worker migration/bootstrap during workflow-postgres-setup to avoid concurrent schema-install races.
.changeset/setup-graphile-worker-schema.mdAnnounces the patch change in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@workflow/world-postgres": patch
---

`workflow-postgres-setup` now also bootstraps the `graphile_worker` schema, fixing potential race on setup when starting the app and a test runner at the same time
@TooTallNate
TooTallNate merged commit 738ec5e into mainMay 19, 2026
185 of 192 checks passed
@TooTallNate
TooTallNate deleted the peter/setup-graphile-worker-schema branch May 19, 2026 21:56
github-actionsBot added a commit that referenced this pull request May 19, 2026
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2027.

pranaygp pushed a commit that referenced this pull request May 20, 2026
#2027)
* fix(world-postgres): bootstrap graphile-worker schema in setup CLI
`workflow-postgres-setup` now installs the `graphile_worker` schema in
addition to the drizzle migrations so that by the time any consumer
calls `world.start()`, both schemas already exist. This eliminates the
inter-process race on graphile-worker's `installSchema` where
concurrent `CREATE SCHEMA IF NOT EXISTS` calls could both pass the
MVCC-snapshotted existence check and one would fail with
`duplicate key value violates unique constraint "pg_namespace_nspname_index"`.
Reproduced locally against a fresh postgres:18-alpine with 8 parallel
`makeWorkerUtils().migrate()` calls — 7/8 fail without the pre-bootstrap,
0/8 fail after running `workflow-postgres-setup` first.
* Apply suggestions from code review
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
This was referenced May 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@VaguelySerious@TooTallNate@pranaygp