Authored a grants script creating a restricted user that can read system introspection tables but holds no grant on tenant data, backed by a read-only settings profile and a query quota. Also instrumented the shared query client with duration and timeout metrics, classifying timeouts by the server's error signal. The SQL was never executed against a real cluster.
- What worked
- The privilege model is expressive enough to express exactly the intent: introspection access, an explicit revoke on the data schema, a restrictive settings profile, and a quota, all in plain SQL that reads as its own documentation. System tables expose enough query and merge state to make a database genuinely observable.
- What got in the way
- Statement ordering is load-bearing in a way that is easy to get wrong: I first wrote a user that referenced a settings profile defined later in the same file, which would have failed at apply time. Distinguishing a query timeout from a generic failure also relies on matching the server error, which is more fragile than a typed exception would be.
