Logical replication limitation
Logical operation ni madad thi, database ni schema ane DDL commmand (CREATE, ALTER & DROP) command replicate na thai sake. aa mate jo tamare matra schema ne copy karvi hoi to aa command no use thai 6e.
pg_dump --schema-only
pan tyar pa6i thatu darek schema changes ne manually sync karvu padse.
Aapde ae pan janyu k publisher and subscriber ni schema same hovi jaruri nathi, pan jo publisher ae moklela data pramne jo koi data field publisher schema ma 6e pan subscriber schema ma nathi to ae case ma subscriber cluster ma error aave sake 6e and possible 6e k jya sudhi ae required fields sync na thai tya sudhi replication work na kari sake. Aa solution mate, jo tame DDL command pehla subscriber cluster ma apply karo and tyar pa6i publisher cluster ma apply karo to aa problem solve thai sake 6e ane aa ek best practice 6e.
Biji ek limitation ae 6e k sequence data replicate na thai. aeno matlab aem 6e k banne cluster ma primary key tarike jo sequence 6e to possible 6e k data ni sequence alag alag hoi.
Replication, matra regular tables matej support thai 6e. pan PostgreSQL 13 pa6i, partition tables pan support thai 6e. pan bija prakar na relations jem k views and materialised views ma jyare replicate karva ni try karie tyare error aave 6e.
To jem k have aapde joyu, replication ne work karva mate thodi conditions 6e.
Conditions for replication to work​
- Table must exist in both publisher and subscriber. we can use
pg_dump --schema-onlyto create tables in subscriber. - Replication mapping ne kaam karva mate banne publisher and subscriber table nu name sarkhu hovu joie and aeni columns name and types bhi same hovi joie. Column order sarkhi hovi ae jaruri nathi. subscriber ma vadhare colums hoi to bhi chale.