Overview
Slony works by adding an AFTER UPDATE/INSERT/DELETE trigger to the master copy (that is, the origin) of every table that you want to replicate. An AFTER UPDATE/INSERT/DELETE trigger is a function that executes after an UPDATE, INSERT, or DELETE command modifies a table. The new trigger pushes each change from the origin into a history table. When a subscriber comes online, it pulls recent changes from the history table. The history table contains a record of every modification. If you UPDATE a row in a replicated table, and then DELETE that row, the history table contains an UPDATE command followed by a DELETE command. When a subscriber pulls the modification history from the provider, it applies each change, in order from earliest change ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access