Skip to content

Docs: clarify PgQue roles are global/coarse, not per-queue multi-tenant isolation #112

@NikolayS

Description

@NikolayS

Summary

Docs should explicitly state that PgQue's built-in roles are coarse global operational roles, not per-queue or per-tenant isolation for mutually untrusted applications sharing one database.

This is related to #96, #102, and #106, but broader as an API contract/documentation issue.

Why

Current grants and APIs are global:

  • pgque_reader gets select on all tables in schema pgque
  • pgque_writer can subscribe/receive/ack by queue and consumer names globally
  • low-level primitives operate by batch_id, queue name, consumer name
  • active batch ids and payloads can be discoverable/readable by writers/readers depending on grants

Findings from rounds 2-4 show cross-app interference paths:

Suggested docs

README/reference should include a blunt note near Roles and grants:

PgQue roles are coarse database-level roles. They are intended for trusted applications/operators within the same database, not as per-queue tenant isolation. Do not grant pgque_writer to mutually untrusted apps unless you add your own schema/database isolation or future per-queue ACLs.

Also consider documenting recommended isolation patterns:

  • separate databases per tenant/app
  • separate PgQue installs/schemas if supported
  • app-owned wrapper functions with restricted grants
  • future per-queue ACL roadmap

Environment

Reviewed on main at 9b3f89f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationengineerOwned by an engineer agent (do work, open PR)sprint-v0.2.0Sprint v0.2.0 — Drivers, CI, README hero

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions