There's more...
Remember in step 3 how we defined the replication set to only forward INSERT and UPDATE statements? The primary reason to do something like this is that we're sending data to some kind of archival system. Since these types of databases tend to accumulate data for months or even years, they're also commonly partitioned. The pglogical extension is perfectly compatible with this approach, but there is one caveat.
Before PostgreSQL 10 introduced native partitioning, partitions were usually managed via a trigger and a complicated series of constraints to distribute data based on inheritance rules. Reporting or other data accumulation systems that use this approach rely on this trigger to ensure data is deposited in the correct ...
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