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.

Last checked 13 October 2026

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

QuestionA read-only roleDeedglass
Stops all writesYes, when the role holds no write privilege1Only the writes your rules deny
Asks a person before risky actionsNo: a role allows or refusesYes: approval in Slack, email or the Console
Checks what Postgres committedNot needed: nothing is writtenYes: reads Postgres's change log
Signed record of each action, checkable offlineNo; Postgres logs what you configureYes
Undoes rowsNot neededYes, with checks before each undo
Runs asPart of PostgresA single binary next to your agent
Price (checked 13 October 2026)FreeFree 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

  1. 1PostgreSQL 18 documentation: Privileges · postgresql.org · checked 13 October 2026
  2. 2PostgreSQL 18 documentation: Client connection defaults · postgresql.org · checked 13 October 2026
  3. 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 scan

Grades only your own setup. Nothing is uploaded.

Pricing