2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

How does pglogical works on partition tables? #135

Open rmadiwaledba opened 6 years ago

rmadiwaledba commented 6 years ago

I am trying to use pglogical for an upgrade but there are many partition tables in my DB. On parent tables, there is no pk column but on child tables, they have their own pk column. Columns there in parent tables are been used in child and child table have three more columns. What I did is I have added the new column(with increment sequence) to the parent and child as there is already pk on the child I have performed an update on all parent and child for that column and created pk on the parent for the newly created column.
pglogical is not handling partition tables and the process is getting terminated. Is there is way to handle partition tables using pglogical?

mchhatani commented 6 years ago

I implemented pglogical with 9.6.1 with hash partitioned tables and it went well. Just add all the partition tables within the replication set in addition to parent table.