feat(world-postgres): make startup recovery optional - #3690
Open
joeyhotz wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: ac36252 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
|
@joeyhotz is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
joeyhotz
marked this pull request as ready for review
August 20, 2026 04:49
Contributor
Author
|
Pinging @vercel/workflow. |
joeyhotz
force-pushed
the
fix/postgres-optional-boot-recovery
branch
from
August 20, 2026 06:17
3a3e72a to
dd36097
Compare
VaguelySerious
approved these changes
Aug 20, 2026
Member
|
@joeyhotz Commits must be signed for me to be able to merge this |
joeyhotz
force-pushed
the
fix/postgres-optional-boot-recovery
branch
from
August 21, 2026 04:49
dd36097 to
ec2dfc3
Compare
Contributor
Author
|
Should be signed now, apologies @VaguelySerious 🙏 |
Signed-off-by: Joey Hotz <joeyhotz1@gmail.com>
joeyhotz
force-pushed
the
fix/postgres-optional-boot-recovery
branch
from
August 21, 2026 04:51
ec2dfc3 to
ac36252
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
world-postgrescurrently scans and re-enqueues every pending/running run whenever a process callsstart(). In a horizontally scaled deployment, an ordinary replica start is not evidence that the fleet failed, so this can create a burst of redundant replay work.Add
recoverActiveRunstoPostgresWorldConfig, matching the existing Local World option. It defaults totrue. Withfalse,start()still starts Graphile Worker and consumes durable/new jobs, but skips the broad storage scan.This is an operational escape hatch, not leader election or exactly-once machinery. Setting it to
falseeverywhere removes automatic startup repair for an active run with no runnable job, so recovery must be handled separately.Related work: #2544 proposes a broader
start({ onRestart })control; #3162 makes boot recovery more selective and deduplicates its jobs; #3138 tracks owner-aware/single-flight recovery. This change is the smallerworld-postgresconstruction-time escape hatch. If #2544 lands, precedence between the two controls should be defined deliberately.Docs Preview
Pending Vercel Labs authorization for the external fork. Changed route:
/v5/docs/configuration/worlds#recoveractiveruns.How did you test your changes?
recoverActiveRuns: false.pnpm exec vitest run src/reenqueue.test.ts— 13/13 passed.pnpm typecheckandpnpm buildpassed for@workflow/world-postgres.PR Checklist - Required to merge
@workflow/world-postgres@vercel/workflowafter the PR and core checks were verified