Skip to content

Support a dedicated non-superuser worker - #439

Draft
Thom Chiovoloni (thomcc-work) wants to merge 1 commit into
mainfrom
thomcc/nosup-gh
Draft

Thom Chiovoloni (thomcc-work) wants to merge 1 commit into
mainfrom
thomcc/nosup-gh

Conversation

@thomcc-work

@thomcc-work Thom Chiovoloni (thomcc-work) commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Operators can run the background worker without SUPERUSER. The default remains postgres. A dedicated LOGIN BYPASSRLS role needs explicit metadata privileges in each origin, plus database CREATE and ownership of the provider objects in the control database. The extension validates these prerequisites; it does not create the role or grant itself privileges.

Worker startup reports missing permissions and retries so an administrator can repair them without recreating the extension. Internal connections use predictable session settings, while workflow SQL still authenticates as the submitter. Status updates distinguish terminal or genuinely absent rows from metadata the worker cannot see.

Compatibility

The dedicated non-superuser worker is reserved for internal operations, including when user steps resume from old histories. Finish workflows submitted as that role before upgrading or switching identities. The default superuser configuration and the existing superuser-submission opt-in are unchanged. No new extension schema or provider version is required. The user guide includes fresh-install grants and conversion steps for existing installations.

Local verification

On stock PostgreSQL 17:

  • Unit suite: 474 passed, 16 ignored. All 14 selected multi-database E2E cases passed.
  • The dedicated-worker lifecycle covered fresh installation, conversion with suspended work, submitter identity, quota enforcement, lock contention, and recovery after missing grants were restored.
  • All 178 upgrade checks passed. In both worker configurations, the real v0.2.9-to-v0.2.10 lifecycle validated 21 final workflow instances across the binary-only and SQL upgrade boundaries.
  • The 29 Python upgrade-harness tests, Rust formatting, and Clippy with warnings denied passed.

The full unfiltered E2E suite and PostgreSQL 18 were not run locally.

The worker needs to maintain metadata across submitters and migrate the
provider schema, but neither operation requires cluster-wide superuser
privileges. Check the configured login, metadata grants, and provider
ownership before starting work, and retry when provisioning is repaired.

Reserve the non-superuser worker for internal connections so that new
submissions and resumed user steps cannot run with its privileges.
Keep the default postgres worker and the durable history format unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@thomcc-work Thom Chiovoloni (thomcc-work) changed the title [Worker roles] Support a dedicated non-superuser worker Support a dedicated non-superuser worker Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to 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.

1 participant