Grant db_o11y pg_read_all_data for explain plans #124

Merged
stasaberg merged 1 commit from feat/db-o11y-explain-access into main 2026-11-29 20:23:31 +01:00
Owner

Explain plans fail because db_o11y lacks schema USAGE (forgejo/immich/appdb: relation does not exist) and table SELECT (others: permission denied). Grants the built-in read-only pg_read_all_data role in scripts/infra/pg-stat-statements.sql.

  • Disposable PG18 test reproduces the forgejo-style restricted schema: EXPLAIN fails before the grant, succeeds after; db_o11y still cannot INSERT; rerun is idempotent.
  • No Compose change, so the infra deploy should not recreate PostgreSQL. The SQL is still a manual step; afterwards restart Alloy to clear its deny list.
  • Trade-off: db_o11y can read all app data (read-only).
Explain plans fail because `db_o11y` lacks schema USAGE (forgejo/immich/appdb: `relation does not exist`) and table SELECT (others: `permission denied`). Grants the built-in read-only `pg_read_all_data` role in `scripts/infra/pg-stat-statements.sql`. - Disposable PG18 test reproduces the forgejo-style restricted schema: EXPLAIN fails before the grant, succeeds after; db_o11y still cannot INSERT; rerun is idempotent. - No Compose change, so the infra deploy should not recreate PostgreSQL. The SQL is still a manual step; afterwards restart Alloy to clear its deny list. - Trade-off: db_o11y can read all app data (read-only).
Grant db_o11y pg_read_all_data for explain plans
All checks were successful
Functional tests / test (pull_request) Successful in 18s
Trivy repository security / scan (pull_request) Successful in 29s
Semgrep security / scan (pull_request) Successful in 3m8s
6d0cdb2813
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
stasaberg/My-stupid-website!124
No description provided.