You run integration tests or a migration across several PostgreSQL databases, and something goes wrong. Restoring full backups takes too long, and rolling back just one database leaves neighboring services out of sync. The first release of Distributed E-Maj 0.9.1 solves that problem.
Dalibo's core E-Maj extension logs changes (INSERT, UPDATE, DELETE, TRUNCATE) in chosen table groups and rolls them back to a saved mark without restoring the whole database. Its main catch was working strictly inside a single database.
Distributed E-Maj extends marks and rollbacks across multiple databases at once. Two clients (Distributed Operations Client and Distributed Rollback Client) coordinate actions via two-phase commit (2PC): either every database commits the step together, or none does. Version 0.9.1 requires E-Maj 5.0.1, supports PostgreSQL 14–19, and ships under GPL-3.0. It's available on PGXN, with setup covered in the documentation.
It's too early for production: author Philippe Beaudoin released 0.9.1 "for testing only," and PGXN lists it as Unstable. On staging and test environments, though, it's ready to try.
