Remix.run Logo
quotemstr 2 days ago

> Totally agree, unfettered access to databases are dangerous

Any decent MVCC database should be able to provide an MCP access to a mutable yet isolated snapshot of the DB though, and it doesn't strike me as crazy to let the agent play with that.

thesz 2 days ago | parent [-]

For this database has to have nested transactions, where COMMITs do propagate up one level and not to the actual database, and not many databases have them. Also, a double COMMIT may propagate changes outside of agent's playbox.

quotemstr 2 days ago | parent [-]

> For this database has to have nested transactions, where COMMITs do propagate up one level and not to the actual database,

Correct, but nested transaction support doesn't seem that much of a reach if you're an MVCC-style system anyway (although you might have to factor out things like row watermarks to lookaside tables if you want to let them be branchy instead of XID being a write lock.)

You could version the index B-tree nodes too.

thesz 2 days ago | parent [-]

  > but nested transaction support doesn't seem that much of a reach if you're an MVCC-style system anyway
You are talking about code that have to be written and tested.

Also, do not forget about double COMMIT, intentional or not.