Skip to content

Architecture

Eric Hanson edited this page Oct 25, 2024 · 1 revision

When people say "database versioning", they usually are referring to schema versioning, and management of database migrations. Many tools already exist that do this. pg_delta however can version both table data and database schema. It builds on the first principle of "datafication" put forward by the Aquameta project, and makes extensive use of its meta system catalog. It is primarily intended for use within Aquameta, but only depends on the meta system catalog, and can be used outside of Aquameta as well.

pg_delta's first design principle is that there are only three things that ever happen in the database: Rows are created, rows are deleted, and fields are changed. A commit is a "delta" composed of these three atomic operations. Under the hood, things are of course much more complicated than this, but as a conceptual model, this is how pg_delta works.

Clone this wiki locally