mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
738ec5e81d
* 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>
207 B
207 B
@workflow/world-postgres
| @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