ops/dbq.sh: read-only Postgres queries across all environments #18
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#18
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/db-query-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Paves the query path (Postgres first; Iceberg follows the same conventions).
Already applied + verified
thermograph_rorole (NOSUPERUSER,pg_read_all_dataonly) in dev, beta and prod.climate_history= 16,434,392 (dev) / 16,487,073 (beta) / 16,541,351 (prod), latest 2026-07-17.create tableagainst prod returnsERROR: permission denied for schema public.Why exec-into-container, not a connection string
No database is exposed over TCP. Each listens only on its private docker network, and prod's is a Swarm overlay (10.0.2.0/24) the host cannot route to — so
ssh -Lworks for beta but is impossible for prod, and publishing 5432 would require new ufw rules plus a Swarm endpoint change on production. Runningpsqlinside the container works identically in all three with zero infra change. The prod container is a Swarm task whose name changes every redeploy, so it's resolved at call time viadocker ps --filter, never hardcoded.Usage
Extra args pass through to psql; stdin is forwarded.
Iceberg path —
ops/README.mdrecords the three conventions a siblingiceberg.shshould follow: env-keyed dispatch with the same argument shape, run the engine where the data is reachable (no new network endpoints), and a dedicated read-only identity so the same enforced-not-assumed property holds.Note: the app's
thermographrole is a superuser and is deliberately not used by this tool.