Repository navigation
Support a dedicated non-superuser worker - #439
Draft
Thom Chiovoloni (thomcc-work) wants to merge 1 commit into
Draft
Thom Chiovoloni (thomcc-work) wants to merge 1 commit into
Thom Chiovoloni (thomcc-work) wants to merge 1 commit into
Conversation
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>
This branch has not been deployed
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.
Summary
Operators can run the background worker without
SUPERUSER. The default remainspostgres. A dedicatedLOGIN BYPASSRLSrole needs explicit metadata privileges in each origin, plus databaseCREATEand 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:
The full unfiltered E2E suite and PostgreSQL 18 were not run locally.