A read-only Postgres role, or Deedglass
If your agent only reads, use a read-only role. You don't need Deedglass. This page is for when that stops being enough.
The short answer
- A role with SELECT and nothing else can't change data, whatever the agent sends. That is the boundary.1
- The read-only setting is a default a session can turn off again, so it is a second fence, not the first.21
- Deedglass is for agents that must write: it decides each write, checks what Postgres committed and keeps a record.
When to choose A read-only role
- The agent answers questions from the data and never needs to change it.
- You can give it its own role with GRANT SELECT and no other privilege.1
- You want nothing new to install: roles and grants are part of Postgres.
When Deedglass fits
- The agent has to write, even a little: ship an order, issue a refund, fix a record.
- You want each write decided by a rule first, and checked against what Postgres committed after.
- You need a record of what changed that someone else can check offline.
Side by side
| Question | A read-only role | Deedglass |
|---|---|---|
| Stops all writes | Yes, when the role holds no write privilege1 | Only the writes your rules deny |
| Asks a person before risky actions | No: a role allows or refuses | Yes: approval in Slack, email or the Console |
| Checks what Postgres committed | Not needed: nothing is written | Yes: reads Postgres's change log |
| Signed record of each action, checkable offline | No; Postgres logs what you configure | Yes |
| Undoes rows | Not needed | Yes, with checks before each undo |
| Runs as | Part of Postgres | A single binary next to your agent |
| Price (checked 13 October 2026) | Free | Free self-host · Pro $49 a month |
Use them together
Use both. Deedglass's agent connections run under a role you create, so the narrowest grants still apply under its rules. One documented trap is worth knowing: Datadog Security Labs showed that an archived Postgres MCP server's read-only mode ran each query in a read-only transaction that a stacked COMMIT; could end, after which later statements ran with the role's full rights.3 A role without write privileges doesn't have that problem.
What Deedglass doesn't do
- It doesn't make a broad role safe. Grants come first; Deedglass decides and checks within them.
- It doesn't stop reads. If the agent shouldn't see a table, don't grant SELECT on it.
Sources
- 1PostgreSQL 18 documentation: Privileges · postgresql.org · checked 13 October 2026
- 2PostgreSQL 18 documentation: Client connection defaults · postgresql.org · checked 13 October 2026
- 3Datadog Security Labs: SQL injection in the Postgres MCP server · securitylabs.datadoghq.com · checked 13 October 2026
Last checked 13 October 2026. We re-check these pages every month. If something is out of date, write to hello@deedglass.com.
Try it on your own setup
npx deedglass scanGrades only your own setup. Nothing is uploaded.