hn.today

Gnomon: Git for Postgres Data

gnomon.bitsinfra.com4 points0 comments
Screenshot of Gnomon: Git for Postgres Data

Gnomon is a PostgreSQL extension for creating database branches, tracking changes, merging them, and undoing merges, with a particular focus on giving AI agents isolated access to real data. It runs inside an existing Postgres database rather than creating separate database copies. A branch reads unchanged data from the main database and stores only its own changes, so it can be created quickly regardless of database size. Applications can use a branch through a connection or session while continuing to run their usual queries. Tracking starts when enabled, without reconstructing earlier history; thereafter, Gnomon can show which rows and fields changed.

The workflow is to create a branch, make changes on it, inspect the diff, and merge approved work into main. Merges use three-way, type-aware logic, represent conflicts as rows, and can be undone. For agents, a command can create a role, branch, and connection string while preventing access to main; merge limits can restrict tables, row counts, and required checks. TypeScript and Python SDKs, plus bindings for other languages, let products assign branches and rules to agent tasks. The documentation also covers branch behavior, review and approvals, time-travel history, field-level blame, diagnosing failed checks, and an ordered change feed that can be sent to systems such as Kafka or NATS.

Read on gnomon.bitsinfra.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.